From 68607b593fc91df2844540d97c8aa807ccf01464 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Fri, 10 Nov 2023 10:41:24 -0700 Subject: perf(cli): strace mode for ops (undocumented) (#21131) Example usage: ``` # Trace every op except op_*tick* cargo run -- run --unstable -A --strace-ops=-tick '/Users/matt/Documents/github/deno/deno/ext/websocket/autobahn/autobahn_server.js # Trace any op matching op_*http* cargo run -- run --unstable -A --strace-ops=http ... ``` Example output: ``` [ 11.478] op_ws_get_buffer : Dispatched Slow [ 11.478] op_ws_get_buffer : Completed Slow [ 11.478] op_ws_send_binary : Dispatched Fast [ 11.478] op_ws_send_binary : Completed Fast [ 11.478] op_ws_next_event : Dispatched Async [ 11.478] op_try_close : Dispatched Fast [ 11.478] op_try_close : Completed Fast [ 11.478] op_timer_handle : Dispatched Fast [ 11.478] op_timer_handle : Completed Fast [ 11.478] op_sleep : Dispatched Asyn ``` --- cli/args/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cli/args/mod.rs') diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 9c113acd2..24d1237aa 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1245,6 +1245,10 @@ impl CliOptions { &self.flags.subcommand } + pub fn strace_ops(&self) -> &Option> { + &self.flags.strace_ops + } + pub fn type_check_mode(&self) -> TypeCheckMode { self.flags.type_check_mode } -- cgit v1.2.3