Problem
Filtered script benchmark runs still initialize unrelated script benches first.
While working on issue #5145 and adding a focused local script benchmark, I tried running only that target with:
cargo bench -p boa_benches -- json/stringify_deep
Even with the filter, benches/benches/scripts.rs initializes all discovered scripts. This includes v8-benches/deltablue, which overflows the stack during registration and aborts the run before the requested benchmark executes.
Repro
cargo bench -p boa_benches -- json/stringify_deep
This fails with a stack overflow in an unrelated v8-benches/* script.
Evidence
Adding temporary logging during registration shows all scripts being initialized:
REGISTERING BENCH: basic\call-loop
...
REGISTERING BENCH: v8-benches\deltablue
...
So the failure happens before the filtered benchmark is reached.
Root Cause
scripts.rs eagerly reads, parses, and evaluates all scripts during registration. Since Criterion filtering happens later, unrelated scripts can still fail and block targeted runs.
Expected Behavior
A filtered run should not be blocked by unrelated script benchmarks being initialized eagerly.
Problem
Filtered script benchmark runs still initialize unrelated script benches first.
While working on issue #5145 and adding a focused local script benchmark, I tried running only that target with:
Even with the filter,
benches/benches/scripts.rsinitializes all discovered scripts. This includesv8-benches/deltablue, which overflows the stack during registration and aborts the run before the requested benchmark executes.Repro
This fails with a stack overflow in an unrelated
v8-benches/*script.Evidence
Adding temporary logging during registration shows all scripts being initialized:
So the failure happens before the filtered benchmark is reached.
Root Cause
scripts.rseagerly reads, parses, and evaluates all scripts during registration. Since Criterion filtering happens later, unrelated scripts can still fail and block targeted runs.Expected Behavior
A filtered run should not be blocked by unrelated script benchmarks being initialized eagerly.