google/benchmark
Voir sur GitHubIntroduce scientific notation for counters in console
Open
#818 ouverte le 13 mai 2019
enhancementgood first issuehelp wanted
Métriques du dépôt
- Stars
- (7 968 stars)
- Métriques de merge PR
- (Merge moyen 4j 2h) (19 PRs mergées en 30 j)
Description
Sometimes it becomes difficult to grasp immediately the differences between benchmarked functions that have a wide variance in a given counter.
The aforementioned readability problem is due to the usage of the SI standard by default.
This one below is an example where I am dealing with different functions to approximate sine, look at the absolute error calculated for each one:
It's not instantly obvious how much more precise the first function is, but it would be using scientific notation:

The usage might be as easy as:
state.counters["Foo"] = Counter(fooVal, benchmark::Counter::kScientificNotation);