dotnet / dotnet/BenchmarkDotNet

Is it possible to calculate the best TimeUnit per logical group?

Open
#1,778 0 comments 2 reactions 0 assignees View on GitHub
up-for-grabs
Dominant language
C#
Stars
11.5k
Forks
1.1k
Avg merge
6d 11h
Merged PRs (30d)
12

Description

As far as I understand it, if the `SummaryStyle.TimeUnit` is set to null/default, BDN calculates the best fitting unit, which seems to be the one that can display the smallest value with less than four digits before the decimal point. Usually that's great, but if there is a rather wide range of results for benchmark cases, it can become cumbersome.

For example, when running both a 'regular' (Short/Medium etc.) job and a `[DryJob]` the results are of course very different, but for macro benchmarks, I often need both. Now I can add grouping via `BenchmarkLogicalGroupRule.ByJob`, but while that will affect baselines, it doesn't affect time units.

Is there any way to do that? If not via config/attributes, maybe by customizing some interface?
Thanks in advance for any help.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.