benchmark/test
Samuel Panzer 296ec5693e Support State::KeepRunningBatch(). (#521)
* Support State::KeepRunningBatch().

State::KeepRunning() can take large amounts of time relative to quick
operations (on the order of 1ns, depending on hardware). For such
sensitive operations, it is recommended to run batches of repeated
operations.

This commit simplifies handling of total_iterations_. Rather than
predecrementing such that total_iterations_ == 1 signals that
KeepRunning() should exit, total_iterations_ == 0 now signals the
intention for the benchmark to exit.

* Create better fast path in State::KeepRunningBatch()

* Replace int parameter with size_t to fix signed mismatch warnings

* Ensure benchmark State has been started even on error.

* Simplify KeepRunningBatch()
2018-02-09 21:57:04 -07:00
..
basic_test.cc Support State::KeepRunningBatch(). (#521) 2018-02-09 21:57:04 -07:00
benchmark_test.cc Enforce using a semicolon after BENCHMARK_MAIN to remove compiler warnings (#495) 2017-12-03 18:45:07 -07:00
CMakeLists.txt Add support for GTest based unit tests. (#485) 2017-12-13 16:26:47 -07:00
complexity_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
cxx03_test.cc Enforce using a semicolon after BENCHMARK_MAIN to remove compiler warnings (#495) 2017-12-03 18:45:07 -07:00
diagnostics_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
donotoptimize_test.cc Fix #342: DoNotOptimize causes compile errors on older GCC versions. (#398) 2017-06-02 15:47:23 -07:00
filter_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
fixture_test.cc Enforce using a semicolon after BENCHMARK_MAIN to remove compiler warnings (#495) 2017-12-03 18:45:07 -07:00
map_test.cc Enforce using a semicolon after BENCHMARK_MAIN to remove compiler warnings (#495) 2017-12-03 18:45:07 -07:00
multiple_ranges_test.cc Enforce using a semicolon after BENCHMARK_MAIN to remove compiler warnings (#495) 2017-12-03 18:45:07 -07:00
options_test.cc Enforce using a semicolon after BENCHMARK_MAIN to remove compiler warnings (#495) 2017-12-03 18:45:07 -07:00
output_test.h Improve some comments. 2017-05-01 23:02:35 +01:00
output_test_helper.cc Trying again to fix error caused by -Wunused-function. 2017-05-03 00:05:15 +01:00
register_benchmark_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
reporter_output_test.cc Improve CPU Cache info reporting -- Add Windows support. (#486) 2017-11-26 13:33:01 -07:00
skip_with_error_test.cc Support State::KeepRunningBatch(). (#521) 2018-02-09 21:57:04 -07:00
statistics_test.cc Add support for GTest based unit tests. (#485) 2017-12-13 16:26:47 -07:00
templated_fixture_test.cc Enforce using a semicolon after BENCHMARK_MAIN to remove compiler warnings (#495) 2017-12-03 18:45:07 -07:00
user_counters_tabular_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00
user_counters_test.cc Refactor most usages of KeepRunning to use the perfered ranged-for. (#459) 2017-10-17 12:17:02 -06:00