Skip to content

Report valgrind Ir per iteration - #581

Draft
tekknolagi wants to merge 2 commits into
mainfrom
mb-callgrind-ir
Draft

tekknolagi wants to merge 2 commits into
mainfrom
mb-callgrind-ir

Conversation

@tekknolagi

@tekknolagi tekknolagi commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor
----------  ------------  ------------  -----------  --------
bench         base (MIr)     exp (MIr)  exp 1st itr  base/exp
fib         482.9 ± 0.0%  482.9 ± 0.0%          N/A     1.000
respond_to  277.1 ± 0.0%  277.1 ± 0.0%          N/A     1.000
----------  ------------  ------------  -----------  --------

We're going to have to consider metrics other than time. The new
callgrind harness, for example, reports "Ir" (instructions). I
originally tried to kind of hack this in but I think it fits better as
an extensible `Metric` type thing.

Harnesses can now report other per-iteration metrics with

    return_results(..., metrics: { name => { "bench" => [...] } }, primary_metric: name)

and have Metric describe how each one is displayed and compared.
Zero and report per-iteration Ir counts instead of one count for the
whole benchmark run. This lets us see change over time, like the
wall-time does (but Ir is less noisy).

Valgrind hides its command line from the program, so the runner passes
--callgrind-out-file in the VALGRIND_OPTS env var, where the harness can
find it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant