From 485fade0b6910e29557c6627d37985b47735bf8e Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Sun, 5 Nov 2023 14:27:36 -0700 Subject: chore: migrate to new deno_core and metrics (#21057) - Uses the new OpMetrics system for sync and async calls - Partial revert of #21048 as we moved Array.fromAsync upstream to deno_core --- cli/args/flags.rs | 1 + cli/args/mod.rs | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'cli/args') diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 82a536e47..9b0f840e9 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -398,6 +398,7 @@ pub struct Flags { pub config_flag: ConfigFlag, pub node_modules_dir: Option, pub vendor: Option, + pub enable_op_summary_metrics: bool, pub enable_testing_features: bool, pub ext: Option, pub ignore: Vec, diff --git a/cli/args/mod.rs b/cli/args/mod.rs index fa8d94de5..4acbb1763 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1137,6 +1137,14 @@ impl CliOptions { } } + pub fn enable_op_summary_metrics(&self) -> bool { + self.flags.enable_op_summary_metrics + || matches!( + self.flags.subcommand, + DenoSubcommand::Test(_) | DenoSubcommand::Repl(_) + ) + } + pub fn enable_testing_features(&self) -> bool { self.flags.enable_testing_features } -- cgit v1.2.3