mirror of
https://github.com/google/benchmark.git
synced 2024-11-28 15:34:33 +00:00
b9be142d1e
* Json reporter: passthrough fp, don't cast it to int; adjust tooling Json output format is generally meant for further processing using some automated tools. Thus, it makes sense not to intentionally limit the precision of the values contained in the report. As it can be seen, FormatKV() for doubles, used %.2f format, which was meant to preserve at least some of the precision. However, before that function is ever called, the doubles were already cast to the integer via RoundDouble()... This is also the case for console reporter, where it makes sense because the screen space is limited, and this reporter, however the CSV reporter does output some( decimal digits. Thus i can only conclude that the loss of the precision was not really considered, so i have decided to adjust the code of the json reporter to output the full fp precision. There can be several reasons why that is the right thing to do, the bigger the time_unit used, the greater the precision loss, so i'd say any sort of further processing (like e.g. tools/compare_bench.py does) is best done on the values with most precision. Also, that cast skewed the data away from zero, which i think may or may not result in false- positives/negatives in the output of tools/compare_bench.py * Json reporter: FormatKV(double): address review note * tools/gbench/report.py: skip benchmarks with different time units While it may be useful to teach it to operate on the measurements with different time units, which is now possible since floats are stored, and not the integers, but for now at least doing such a sanity-checking is better than providing misinformation. |
||
---|---|---|
.. | ||
basic_test.cc | ||
benchmark_test.cc | ||
CMakeLists.txt | ||
complexity_test.cc | ||
cxx03_test.cc | ||
diagnostics_test.cc | ||
donotoptimize_test.cc | ||
filter_test.cc | ||
fixture_test.cc | ||
map_test.cc | ||
multiple_ranges_test.cc | ||
options_test.cc | ||
output_test.h | ||
output_test_helper.cc | ||
register_benchmark_test.cc | ||
reporter_output_test.cc | ||
skip_with_error_test.cc | ||
user_counters_tabular_test.cc | ||
user_counters_test.cc |