mirror of
https://github.com/google/benchmark.git
synced 2024-12-01 07:16:07 +00:00
a271c36af9
* Drop Stat1, refactor statistics to be user-providable, add median. My main goal was to add median statistic. Since Stat1 calculated the stats incrementally, and did not store the values themselves, it is was not possible. Thus, i have replaced Stat1 with simple std::vector<double>, containing all the values. Then, i have refactored current mean/stdev to be a function that is provided with values vector, and returns the statistic. While there, it seemed to make sense to deduplicate the code by storing all the statistics functions in a map, and then simply iterate over it. And the interface to add new statistics is intentionally exposed, so they may be added easily. The notable change is that Iterations are no longer displayed as 0 for stdev. Is could be changed, but i'm not sure how to nicely fit that into the API. Similarly, this dance about sometimes (for some fields, for some statistics) dividing by run.iterations, and then multiplying the calculated stastic back is also dropped, and if you do the math, i fail to see why it was needed there in the first place. Since that was the only use of stat.h, it is removed. * complexity.h: attempt to fix MSVC build * Update README.md * Store statistics to compute in a vector, ensures ordering. * Add a bit more tests for repetitions. * Partially address review notes. * Fix gcc build: drop extra ';' clang, why didn't you warn me? * Address review comments. * double() -> 0.0 * early return |
||
---|---|---|
.. | ||
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 |