Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: advanced metrics beyond wall time (CPU time, instruction count, ...) #736

Open
intelfx opened this issue Mar 21, 2024 · 0 comments
Open

Comments

@intelfx
Copy link

intelfx commented Mar 21, 2024

While there certainly have been similar feature requests that were all shot down (#135, #153, #170 etc.) I believe this one is materially different. It is also somewhat related to #660, but again different.


While hyperfine has rudimentary support for measuring detailed process times (user/system time) and displaying them along the wall clock time in the CLI report, they are not the primary metric (the one whose mean+deviation is shown, the one that hyperfine uses for statistical analysis and also presumably for outlier detection etc.).

I propose to implement a fixed set of additional metrics that could be selected instead of wall time as the "benchmark target", i.e. the primary measurement that is fed into all of hyperfine's machinery.

Obvious ideas are total CPU time, user time and system time (e.g. if I wanted to measure multiprocessing overhead, I would run hyperfine with the parallelism factor as the parameter and CPU time as the metric).

Less obvious metrics are various hardware performance counters as measured by perf — for instance, instruction count, cycles count, or perhaps just arbitrary perf expressions. Naturally, these would be Linux-only. The instruction count, in particular, is the metric that the Rust compiler team uses to benchmark rustc (ref.), so there is certainly some value in adopting it or similar.

@intelfx intelfx changed the title RFE: using advanced metrics beyond wall time (CPU time, instruction count, ...) RFE: advanced metrics beyond wall time (CPU time, instruction count, ...) Mar 21, 2024
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

No branches or pull requests

1 participant