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

Add median to the end of output #344

Closed
wants to merge 4 commits into from

Conversation

nicholas-l
Copy link

@nicholas-l nicholas-l commented Oct 27, 2020

I tried adding the media to between min and max however the output became rather long.

Related to #341

src/hyperfine/benchmark.rs Outdated Show resolved Hide resolved
@sharkdp
Copy link
Owner

sharkdp commented Oct 27, 2020

Thank you for your contribution!

To be honest, I'm not really satisfied with this solution. Thematically, the median value definitely belongs to the min/max values. It should also be displayed in a similar way, I think. Maybe we could remove the word "Range" as well as the parentheses around (mean ± σ) and (min … max) and then replace "min … max" by something that includes the median as well.

Maybe something like:

  Time mean ± σ:          3.3 ms ± 0.5 ms      [User: 1.9 ms, System: 3.0 ms]
  min … median … max:     2.6 ms … 3.1 ms … 8.2 ms

(and move the number of runs to the top (after the command)

But that's just one idea. I'm open for other suggestions as well. This is more about experimenting with different options. If none of them really work, I'd rather not display the median value at all.

Sorry if that was not clear from the issue description.

@nicholas-l
Copy link
Author

Thanks for the feedback! I was trying to see what worked (see bb84f87). I'll update the PR with your suggestions.

@nicholas-l
Copy link
Author

I have updated the PR with your suggestions. I made the median yellow, as the other colours we 'taken' but can easily change it. Also I am aligning the number of runs to the end of the first line, I hope that makes sense.

Benchmark #1: sleep 0.3

  Time mean ± σ:       303.3 ms ±   0.6 ms    [User: 1.7 ms, System: 1.3 ms]
  min … median … max:  302.4 ms … 303.3 ms … 304.6 ms                10 runs

@sharkdp
Copy link
Owner

sharkdp commented Oct 17, 2021

I'm sorry, but the proposed layout looks much more messy than before IMO. I decided not to show the median at all for now.

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.

2 participants