summaryrefslogtreecommitdiff
path: root/bench_util/js_runtime.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2022-10-27 07:58:27 -0700
committerGitHub <noreply@github.com>2022-10-27 16:58:27 +0200
commit115cc1e6ae00cfd9283c1549060892e0c00dcbc4 (patch)
tree695d3d5715439796c48780df49039f1803d6aae3 /bench_util/js_runtime.rs
parent02187966c108fd50354c8de57bab443a5b262373 (diff)
Revert "perf(core): generate inlined wrappers for async ops (#16428)" (#16443)
Diffstat (limited to 'bench_util/js_runtime.rs')
-rw-r--r--bench_util/js_runtime.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/bench_util/js_runtime.rs b/bench_util/js_runtime.rs
index f87fa3b03..06dd79fae 100644
--- a/bench_util/js_runtime.rs
+++ b/bench_util/js_runtime.rs
@@ -63,6 +63,7 @@ pub fn bench_js_sync_with(
let code = v8::String::new(scope, looped_src.as_ref()).unwrap();
let script = v8::Script::compile(scope, code, None).unwrap();
+
// Run once if profiling, otherwise regular bench loop
if is_profiling() {
script.run(scope).unwrap();
@@ -101,9 +102,7 @@ pub fn bench_js_async_with(
};
let looped = loop_code(inner_iters, src);
let src = looped.as_ref();
- runtime
- .execute_script("init", "Deno.core.initializeAsyncOps();")
- .unwrap();
+
if is_profiling() {
for _ in 0..opts.profiling_outer {
tokio_runtime.block_on(inner_async(src, &mut runtime));