sharkdp / hyperfine

A command-line benchmarking tool
Apache License 2.0
20.69k stars 333 forks source link

Nicer whiskers plot #727

Closed serpent7776 closed 3 months ago

serpent7776 commented 4 months ago

I like this layout much more, but if needed I can hide new functionality behind command line flags.

sharkdp commented 3 months ago

Thank you!

Can you provide a before-and-after screenshot?

sort data by median, ascending

This would be nice to have as an option, but I prefer benchmarks to be ordered by input ordering — by default.

serpent7776 commented 3 months ago

Sure, here's the old version:

plot_old

This is the new version (one issue is that longer labels are cut off):

plot_new

I can fix the issue by applying plt.figure(figsize=(10, 6), constrained_layout=True), but I don't know why this works:

plot_sized

sharkdp commented 3 months ago

Cool — looks great! If we can hide the sorting feature behind a command line option (maybe --sort-by=…), I'm happy to merge this.

serpent7776 commented 3 months ago

Updated the code.

sharkdp commented 3 months ago

Thank you