criterion.rs icon indicating copy to clipboard operation
criterion.rs copied to clipboard

Benchmark Group members should use the same unit

Open djugei opened this issue 6 years ago • 3 comments

currently benchmarks within the same benchmark group may use different time units for displaying, this makes it a bit harder to compare at a glance. for example one may use nano-seconds and one micro-seconds.

they should instead use one unit for the whole group.

djugei avatar Jan 01 '20 23:01 djugei

Hey, thanks for the suggestion and thanks for trying Criterion.rs!

I agree this would be nice to have. Unfortunately, I haven't had a lot of time to work on Criterion.rs lately. Pull requests would be welcome though.

bheisler avatar Jan 03 '20 00:01 bheisler

That's indeed much needed!

I've just bumped into this

image

I was looking at results and thinking that this is x2 times faster, but only after few hours I understood that it is actually 500x times slower

I just thought that rustc did some crazy optimization.

Mart-Bogdan avatar May 01 '23 22:05 Mart-Bogdan

Perhaps we can force measurement units for whole benchmark in config/env/cli option? Not for groups but for whole process?

Mart-Bogdan avatar May 01 '23 22:05 Mart-Bogdan