Commit 9a8880be authored by Niklas Mischkulnig's avatar Niklas Mischkulnig

gate histogram behind debug_assertions

parent 26547c3c
...@@ -951,6 +951,8 @@ pub async fn analyse_ecmascript_module_internal( ...@@ -951,6 +951,8 @@ pub async fn analyse_ecmascript_module_internal(
.instrument(span) .instrument(span)
.await?; .await?;
#[cfg(debug_assertions)]
{
static HISTOGRAM: once_cell::sync::Lazy<Option<String>> = static HISTOGRAM: once_cell::sync::Lazy<Option<String>> =
once_cell::sync::Lazy::new(|| std::env::var("JSVALUE_HISTOGRAM").ok()); once_cell::sync::Lazy::new(|| std::env::var("JSVALUE_HISTOGRAM").ok());
if let Some(p) = HISTOGRAM.as_ref() if let Some(p) = HISTOGRAM.as_ref()
...@@ -988,6 +990,7 @@ pub async fn analyse_ecmascript_module_internal( ...@@ -988,6 +990,7 @@ pub async fn analyse_ecmascript_module_internal(
} }
} }
} }
}
let span = tracing::info_span!("effects processing", count = var_graph.effects.len()); let span = tracing::info_span!("effects processing", count = var_graph.effects.len());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment