google/benchmark

Introduce scientific notation for counters in console

Open

#818 geöffnet am 13. Mai 2019

Auf GitHub ansehen
 (4 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)C++ (1.539 Forks)batch import
enhancementgood first issuehelp wanted

Repository-Metriken

Stars
 (7.968 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 4T 2h) (19 gemergte PRs in 30 T)

Beschreibung

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: Screenshot_20190513_185727 It's not instantly obvious how much more precise the first function is, but it would be using scientific notation: Screenshot_20190513_202852

The usage might be as easy as:

state.counters["Foo"] = Counter(fooVal, benchmark::Counter::kScientificNotation);

Contributor Guide