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

Include parameters in output #704

Closed
joshhunt opened this issue Nov 7, 2023 · 2 comments
Closed

Include parameters in output #704

joshhunt opened this issue Nov 7, 2023 · 2 comments

Comments

@joshhunt
Copy link

joshhunt commented Nov 7, 2023

I'm trying to benchmark the same command's performance in two difference git branches, using parameters to switch between the branches:

hyperfine --warmup 1 --runs 5 -L branch main,upgrade --prepare "git co {branch}; yarn" "yarn tsc --noEmit"

However, at the end the output doesn't make it clear which parameter performed better

Benchmark 1: yarn tsc --noEmit
  Time (mean ± σ):     12.865 s ±  0.067 s    [User: 18.382 s, System: 1.247 s]
  Range (min … max):   12.785 s … 12.966 s    5 runs

Benchmark 2: yarn tsc --noEmit
  Time (mean ± σ):     12.033 s ±  0.092 s    [User: 16.474 s, System: 1.463 s]
  Range (min … max):   11.965 s … 12.189 s    5 runs

Summary
  'yarn tsc --noEmit' ran
    1.07 ± 0.01 times faster than 'yarn tsc --noEmit'

It would be great if the output included the value of the parameter.

As a workaround, I can make the benchmark command something like "yarn tsc --noEmit; echo '{branch}'" just to distinguish between the two

@sharkdp
Copy link
Owner

sharkdp commented Nov 7, 2023

I think this should be supported since #644, which landed in hyperfine 1.17

@joshhunt
Copy link
Author

joshhunt commented Nov 8, 2023

Ahhh, I should have checked!

I did try searching for issues before filing this, but didn't find #600 for some reason.

Thanks!

@joshhunt joshhunt closed this as completed Nov 8, 2023
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

2 participants