From 5a8a989b7815023f33a1e3183a55cc8999af5d98 Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Sun, 10 Oct 2021 17:20:30 +0200 Subject: refactor(metrics): move to core (#12386) Avoids overhead of wrapping ops (and allocs when inspecting async-op futures) --- runtime/ops/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'runtime/ops') diff --git a/runtime/ops/mod.rs b/runtime/ops/mod.rs index ee2bc0a1e..fa547f2ed 100644 --- a/runtime/ops/mod.rs +++ b/runtime/ops/mod.rs @@ -14,7 +14,6 @@ mod utils; pub mod web_worker; pub mod worker_host; -use crate::metrics::metrics_op; use deno_core::error::AnyError; use deno_core::op_async; use deno_core::op_sync; @@ -37,7 +36,7 @@ pub fn reg_async( R: Future> + 'static, RV: Serialize + 'static, { - rt.register_op(name, metrics_op(name, op_async(op_fn))); + rt.register_op(name, op_async(op_fn)); } pub fn reg_sync(rt: &mut JsRuntime, name: &'static str, op_fn: F) @@ -47,7 +46,7 @@ where B: DeserializeOwned, R: Serialize + 'static, { - rt.register_op(name, metrics_op(name, op_sync(op_fn))); + rt.register_op(name, op_sync(op_fn)); } /// `UnstableChecker` is a struct so it can be placed inside `GothamState`; -- cgit v1.2.3