Repository navigation
docs(cargo-codspeed): clarify BENCHNAME and --bench help - #195
not-matthias merged 2 commits into
Conversation
|
Merging this PR will degrade performance by 7.69%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | rem |
232.3 ns | 178.1 ns | +30.42% |
| ⚡ | Simulation | div |
232.3 ns | 178.1 ns | +30.42% |
| ⚡ | Simulation | find_highest_set_bit[42] |
283.5 ns | 229.3 ns | +23.62% |
| ⚡ | Simulation | find_highest_set_bit[1024] |
283.5 ns | 229.3 ns | +23.62% |
| ⚡ | Simulation | find_highest_set_bit[255] |
283.5 ns | 229.3 ns | +23.62% |
| ⚡ | Simulation | find_highest_set_bit[65535] |
283.5 ns | 229.3 ns | +23.62% |
| ⚡ | WallTime | bench_array1[42] |
41 ns | 35 ns | +17.14% |
| ⚡ | WallTime | permutations[6] |
75.1 µs | 69.7 µs | +7.84% |
| ⚡ | WallTime | add_two_integers[(255, 255)] |
20 ns | 19 ns | +5.26% |
| ⚡ | WallTime | add_two_integers[(42, 13)] |
20 ns | 19 ns | +5.26% |
| ⚡ | WallTime | n_queens_solver[4] |
2.4 µs | 2.2 µs | +4.81% |
| ⚡ | WallTime | generate_parentheses[5] |
23.2 µs | 22.3 µs | +3.82% |
| 👁 | WallTime | rem |
5 ns | 6 ns | -16.67% |
| 👁 | WallTime | mul |
2 ns | 3 ns | -33.33% |
| 👁 | WallTime | hamiltonian_cycle[5] |
890 ns | 923 ns | -3.58% |
| 👁 | WallTime | iter_with_setup |
53 ns | 56 ns | -5.36% |
| 👁 | WallTime | iter_batched_ref_large_input |
5 ns | 6 ns | -16.67% |
| 👁 | WallTime | iter_batched_large_input |
9 ns | 10 ns | -10% |
| 👁 | WallTime | from_elem_decimal[1024] |
210 ns | 221 ns | -4.98% |
| 👁 | Simulation | iterative[30] |
290.4 ns | 346 ns | -16.06% |
| ... | ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing cod-3789-wizard-run-only-the-targeted-benchmark-cases-anchored (8d24c95) with main (832f252)
11ea0e5 to
d3bca8e
Compare
The BENCHNAME help claimed a substring match on benchmark names. It is an unanchored regex forwarded to each bench binary, and the matched string differs by mode: the CodSpeed URI in simulation/memory, the framework's own name in walltime. Document that, how to use --exact, and that an empty selection still exits successfully. The --bench help now mentions it can be repeated.
d3bca8e to
8d24c95
Compare
|
@codspeedbot why did so many simulation benches regress? |
Short answer: I don't think these are real regressions. Every flagged simulation benchmark is very small (roughly 100–800 ns), and all of them moved by the same fixed amount of time. That pattern comes from the base and head runs landing on different runners and from code layout, not from slower code in this PR. What the report shows
Same-machine checkI ran
On one machine the shift is again a fixed amount (about 29 ns), and most of the benchmarks that "regressed" in CI come out faster. A few divan benchmarks the PR doesn't touch ( Other notes
Suggested action: acknowledge these as expected on CodSpeed. If these jumps on sub-microsecond benchmarks keep coming up, two options help: give the tiny benchmarks more work per iteration so one cache miss matters less, or run the simulation jobs on fixed hardware. Summary
Was this response helpful? React with 👍 or 👎 to help us improve CodSpeedBot. |
TLDR:
cargo codspeed run --helpsaid BENCHNAME selects benches "containing this string". It is an unanchored regex, and what it matches differs by measurement mode.crate::mod::fn::arg, criteriongroup/fn/arg); how to pass-- --exact(divan/criterion only); empty selections exit 0.verbatim_doc_commentkeeps the mode list on separate lines in--help.--benchhelp: notes it can be repeated. Wording stays mode-neutral sincebuildandrunshare it.Review notes