Repository navigation
fix(vitest-plugin): prefix walltime URIs of top-level benches with the file path - #103
not-matthias wants to merge 1 commit into
Conversation
…e file path The walltime runner only registered URI prefixes for nested suites, so a bench declared outside a `describe` block reported `::<name>` to the runner while its results used `<file>::<name>`. The profile and results URIs then no longer matched and the benchmark had no flamegraph. Register the root file suite too, and add a top-level bench to the Vitest 3 and 4 examples. Refs COD-3984
Merging this PR will regress 7 benchmarks3 warnings, 1 note
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
[Medium impact] The PR appears safe to merge. SummaryFixes missing file prefixes for top-level benchmark markers in Vitest 3 and 4 walltime runs.
No actionable issues found. Tests were not run. Reviews (1) · Last reviewed commit: "fix(vitest-plugin): prefix walltime URIs..." · Reviewed by Greptile |
In walltime mode with Vitest 3 and 4, a bench declared outside a
describeblock reports::<name>to the runner, while its results use<file>::<name>. The profile and the results end up under different URIs, so the benchmark gets no flamegraph.WalltimeRunner.populateBenchmarkUrisregistered URI prefixes for nested suites only. A top-level bench belongs to the root file suite, so the prefix lookup returned an empty string. The root suite is now registered with the file path. Nested suites keep the same prefixes as before.The new
walltime.test.tsruns a top-level bench and a nested bench through the runner and checks the URIs passed tosetExecutedBenchmark. Without the fix it gets::top-level bench. The Vitest 3 and 4 examples also get a top-level bench, so CI covers this case.The Vitest 5 provider builds its URIs from the test's file path and was not affected.
Refs COD-3984