benchmark/test
Vy Nguyen 6cf7725ea1
Allow specifying number of iterations via --benchmark_min_time. (#1525)
* Allow specifying number of iterations via --benchmark_min_time.

Make the flag accept two new suffixes:
 + <integer>x: number of iterations
 + <floag>s: minimum number of seconds.

This matches the internal benchmark API.

* forgot to change flag type to string

* used tagged union instead of std::variant, which is not available pre C++14

* update decl in benchmark_runner.h too

* fixed errors

* refactor

* backward compat

* typo

* use IterationCount type

* fixed test

* const_cast

* ret type

* remove extra _

* debug

* fixed bug from reporting that caused the new configs not to be included in the final report

* addressed review comments

* restore unnecessary changes in test/BUILD

* fix float comparisons warnings from Release builds

* clang format

* fix visibility warning

* remove misc file

* removed  backup files

* addressed review comments

* fix shorten in warning

* use suffix for existing min_time specs to silent warnings in tests

* fix leaks

* use default min-time value in flag decl for consistency

* removed double kMinTimeDecl from benchmark.h

* dont need to preserve errno

* add death tests

* Add BENCHMARK_EXPORT to hopefully fix missing def errors

* only enable death tests in debug mode because bm_check is no-op in release mode

* guard death tests with additional support-check macros

* Add additional guard to prevent running in Release mode

---------

Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
2023-02-07 11:45:18 +00:00
..
args_product_test.cc Fix Clang-Tidy warnings related to modernize-use-override (#1523) 2023-01-09 17:52:18 +00:00
AssemblyTests.cmake Partially revert "Do not depend on unversioned python binary (#1496)" (#1501) 2022-10-13 10:03:29 +01:00
basic_test.cc Avoid potential truncation issues for the integral type parameterized tests. (#1341) 2022-02-08 16:40:43 +00:00
benchmark_gtest.cc Ensure we don't need benchmark installed to pass c++ feature checks (#1456) 2022-08-04 15:33:35 +01:00
benchmark_min_time_flag_iters_test.cc Allow specifying number of iterations via --benchmark_min_time. (#1525) 2023-02-07 11:45:18 +00:00
benchmark_min_time_flag_time_test.cc Allow specifying number of iterations via --benchmark_min_time. (#1525) 2023-02-07 11:45:18 +00:00
benchmark_name_gtest.cc Introduce warmup phase to BenchmarkRunner (#1130) (#1399) 2022-05-23 13:50:17 +01:00
benchmark_random_interleaving_gtest.cc Expose default display reporter creation in public API (#1344) 2022-02-11 10:23:05 +00:00
benchmark_setup_teardown_test.cc Fix typos found by codespell (#1519) 2023-01-10 12:25:32 +00:00
benchmark_test.cc get rid of some deprecation warnings from tests 2023-02-06 16:38:53 +00:00
BUILD Allow specifying number of iterations via --benchmark_min_time. (#1525) 2023-02-07 11:45:18 +00:00
clobber_memory_assembly_test.cc format tests with clang-format (#1282) 2021-11-10 16:22:31 +00:00
CMakeLists.txt Allow specifying number of iterations via --benchmark_min_time. (#1525) 2023-02-07 11:45:18 +00:00
commandlineflags_gtest.cc Add benchmark_context flag that allows per-run custom context. (#1127) 2021-05-04 14:36:11 +01:00
complexity_test.cc fix some build warnings on type conversions 2022-06-08 10:32:20 +01:00
cxx03_test.cc format tests with clang-format (#1282) 2021-11-10 16:22:31 +00:00
diagnostics_test.cc format tests with clang-format (#1282) 2021-11-10 16:22:31 +00:00
display_aggregates_only_test.cc Introduce Coefficient of variation aggregate (#1220) 2021-09-03 18:44:10 +01:00
donotoptimize_assembly_test.cc Fix DoNotOptimize() GCC copy overhead (#1340) (#1410) 2022-06-20 10:12:58 +01:00
donotoptimize_test.cc Fix DoNotOptimize() GCC compile error with some types (#1340) (#1424) 2022-07-04 10:27:05 +01:00
filter_test.cc Fix Clang-Tidy warnings related to modernize-use-override (#1523) 2023-01-09 17:52:18 +00:00
fixture_test.cc Fix Clang-Tidy warnings related to modernize-use-override (#1523) 2023-01-09 17:52:18 +00:00
internal_threading_test.cc format tests with clang-format (#1282) 2021-11-10 16:22:31 +00:00
link_main_test.cc Add benchmark_main target. (#601) 2018-05-25 11:18:58 +01:00
map_test.cc Fix Clang-Tidy warnings related to modernize-use-override (#1523) 2023-01-09 17:52:18 +00:00
memory_manager_test.cc Fix Clang-Tidy warnings related to modernize-use-override (#1523) 2023-01-09 17:52:18 +00:00
min_time_parse_gtest.cc Allow specifying number of iterations via --benchmark_min_time. (#1525) 2023-02-07 11:45:18 +00:00
multiple_ranges_test.cc Fix Clang-Tidy warnings related to modernize-use-override (#1523) 2023-01-09 17:52:18 +00:00
options_test.cc Bug fix variable 'actual_iterations' set but not used (#1517) 2022-12-19 14:03:11 +00:00
output_test_helper.cc Fix Clang-Tidy warnings readability-else-after-return (#1528) 2023-01-16 12:28:48 +00:00
output_test.h clang-tidy: readability-redundant and performance (#1298) 2021-12-06 11:18:04 +00:00
perf_counters_gtest.cc Cache PerfCounters instance in PerfCountersMeasurement (#1308) 2022-01-25 10:14:20 +00:00
perf_counters_test.cc fix clang-tidy warnings (#1195) 2021-06-29 11:06:53 +01:00
register_benchmark_test.cc Fix Clang-Tidy warnings related to modernize-use-override (#1523) 2023-01-09 17:52:18 +00:00
repetitions_test.cc Statistics: add support for percentage unit in addition to time (#1219) 2021-09-03 15:36:56 +01:00
report_aggregates_only_test.cc Introduce Coefficient of variation aggregate (#1220) 2021-09-03 18:44:10 +01:00
reporter_output_test.cc Clean up test documentation formatting (#1475) 2022-08-27 20:41:33 +03:00
skip_with_error_test.cc Fix Clang-Tidy warnings related to modernize-use-override (#1523) 2023-01-09 17:52:18 +00:00
spec_arg_test.cc Fix Clang-Tidy warnings related to modernize-use-override (#1523) 2023-01-09 17:52:18 +00:00
spec_arg_verbosity_test.cc Add option to get the verbosity provided by commandline flag -v (#1330) (#1397) 2022-05-17 17:59:36 +01:00
state_assembly_test.cc Iteration counts should be uint64_t globally. (#817) 2019-05-13 12:33:11 +03:00
statistics_gtest.cc Introduce Coefficient of variation aggregate (#1220) 2021-09-03 18:44:10 +01:00
string_util_gtest.cc format tests with clang-format (#1282) 2021-11-10 16:22:31 +00:00
templated_fixture_test.cc format tests with clang-format (#1282) 2021-11-10 16:22:31 +00:00
time_unit_gtest.cc Fix Clang-Tidy warnings related to modernize-use-override (#1523) 2023-01-09 17:52:18 +00:00
user_counters_tabular_test.cc COnsole reporter: if statistic produces percents, format it as such (#1221) 2021-09-06 11:33:27 +03:00
user_counters_test.cc Clean up test documentation formatting (#1475) 2022-08-27 20:41:33 +03:00
user_counters_thousands_test.cc Statistics: add support for percentage unit in addition to time (#1219) 2021-09-03 15:36:56 +01:00