From d332bf113259f65e90b18b543f19def248e38daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 25 Feb 2022 16:14:46 +0100 Subject: 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. --- core/01_core.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core') diff --git a/core/01_core.js b/core/01_core.js index 3a05a0cff..50d4537f0 100644 --- a/core/01_core.js +++ b/core/01_core.js @@ -57,6 +57,10 @@ opCallTracingEnabled = true; } + function isOpCallTracingEnabled() { + return opCallTracingEnabled; + } + function setPromise(promiseId) { const idx = promiseId % RING_SIZE; // Move old promise from ring to map @@ -246,6 +250,7 @@ Interrupted, InterruptedPrototype, enableOpCallTracing, + isOpCallTracingEnabled, opCallTraces, }); -- cgit v1.2.3