google/benchmark

Introduce scientific notation for counters in console

Open

#818 建立於 2019年5月13日

在 GitHub 查看
 (4 留言) (2 反應) (0 負責人)C++ (1,539 fork)batch import
enhancementgood first issuehelp wanted

倉庫指標

Star
 (7,968 star)
PR 合併指標
 (平均合併 4天 2小時) (30 天內合併 19 個 PR)

描述

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);

貢獻者指南