summaryrefslogtreecommitdiff
path: root/cli/tools/test/fmt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/test/fmt.rs')
-rw-r--r--cli/tools/test/fmt.rs20
1 files changed, 12 insertions, 8 deletions
diff --git a/cli/tools/test/fmt.rs b/cli/tools/test/fmt.rs
index fa2362ea1..fe2007025 100644
--- a/cli/tools/test/fmt.rs
+++ b/cli/tools/test/fmt.rs
@@ -2,6 +2,7 @@
use deno_core::stats::RuntimeActivity;
use deno_core::stats::RuntimeActivityDiff;
+use deno_core::stats::RuntimeActivityTrace;
use deno_core::stats::RuntimeActivityType;
use phf::phf_map;
use std::borrow::Cow;
@@ -165,16 +166,19 @@ fn format_sanitizer_accum(
fn format_sanitizer_accum_item(
activity: RuntimeActivity,
-) -> (RuntimeActivityType, Cow<'static, str>, Option<String>) {
+) -> (
+ RuntimeActivityType,
+ Cow<'static, str>,
+ Option<RuntimeActivityTrace>,
+) {
let activity_type = activity.activity();
match activity {
- // TODO(mmastrac): OpCallTrace needs to be Eq
- RuntimeActivity::AsyncOp(_, name, trace) => {
- (activity_type, name.into(), trace.map(|x| x.to_string()))
+ RuntimeActivity::AsyncOp(_, trace, name) => {
+ (activity_type, name.into(), trace)
}
- RuntimeActivity::Interval(_) => (activity_type, "".into(), None),
- RuntimeActivity::Resource(_, name) => (activity_type, name.into(), None),
- RuntimeActivity::Timer(_) => (activity_type, "".into(), None),
+ RuntimeActivity::Interval(..) => (activity_type, "".into(), None),
+ RuntimeActivity::Resource(.., name) => (activity_type, name.into(), None),
+ RuntimeActivity::Timer(..) => (activity_type, "".into(), None),
}
}
@@ -354,7 +358,7 @@ mod tests {
// https://github.com/denoland/deno/issues/13729
// https://github.com/denoland/deno/issues/13938
- leak_format_test!(op_unknown, true, [RuntimeActivity::AsyncOp(0, "op_unknown", None)],
+ leak_format_test!(op_unknown, true, [RuntimeActivity::AsyncOp(0, None, "op_unknown")],
" - An async call to op_unknown was started in this test, but never completed.\n\
To get more details where ops were leaked, run again with --trace-ops flag.\n");
}