summaryrefslogtreecommitdiff
path: root/core/01_core.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-02-25 16:14:46 +0100
committerGitHub <noreply@github.com>2022-02-25 16:14:46 +0100
commitd332bf113259f65e90b18b543f19def248e38daa (patch)
treeed842487aa4f903d50bbb45d8ed2b5292257eda7 /core/01_core.js
parent111c343281b559ea51fd66c2ddc260549406a822 (diff)
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.
Diffstat (limited to 'core/01_core.js')
-rw-r--r--core/01_core.js5
1 files changed, 5 insertions, 0 deletions
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,
});