diff --git a/starlark/src/environment/modules.rs b/starlark/src/environment/modules.rs index 7fdc12c14..20c5a812e 100644 --- a/starlark/src/environment/modules.rs +++ b/starlark/src/environment/modules.rs @@ -418,6 +418,7 @@ impl Module { extra_value, heap_profile_on_freeze, } = self; + #[cfg(not(target_arch = "wasm32"))] let start = Instant::now(); // This is when we do the GC/freeze, using the module slots as roots // Note that we even freeze anonymous slots, since they are accessed by @@ -455,7 +456,10 @@ impl Module { heap: freezer.into_ref(), module: frozen_module_ref, extra_value, + #[cfg(not(target_arch = "wasm32"))] eval_duration: start.elapsed() + eval_duration.get(), + #[cfg(target_arch = "wasm32")] + eval_duration: eval_duration.get(), }) }