mirror of
https://github.com/denoland/deno.git
synced 2025-09-15 07:05:08 +00:00
feat: deno test --trace-ops (#13770)
This commit adds "--trace-ops" flag to "deno test" subcommand. This flag enables saving of stack traces for async ops, that before were always saved. While the feature proved to be very useful it comes with a significant performance hit, it's caused by excessive source mapping of stack frames.
This commit is contained in:
parent
111c343281
commit
d332bf1132
6 changed files with 78 additions and 7 deletions
|
@ -208,9 +208,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
throw `Test case is leaking async ops.
|
||||
let msg = `Test case is leaking async ops.
|
||||
|
||||
- ${ArrayPrototypeJoin(details, "\n - ")}`;
|
||||
|
||||
if (!core.isOpCallTracingEnabled()) {
|
||||
msg +=
|
||||
`\n\nTo get more details where ops were leaked, run again with --trace-ops flag.`;
|
||||
}
|
||||
|
||||
throw msg;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue