15 #ifndef BENCHMARK_RUNNER_H_
16 #define BENCHMARK_RUNNER_H_
21 #include "benchmark_api_internal.h"
22 #include "internal_macros.h"
23 #include "perf_counters.h"
24 #include "thread_manager.h"
28 BM_DECLARE_double(benchmark_min_time);
29 BM_DECLARE_double(benchmark_min_warmup_time);
30 BM_DECLARE_int32(benchmark_repetitions);
31 BM_DECLARE_bool(benchmark_report_aggregates_only);
32 BM_DECLARE_bool(benchmark_display_aggregates_only);
33 BM_DECLARE_string(benchmark_perf_counters);
37 extern MemoryManager* memory_manager;
40 std::vector<BenchmarkReporter::Run> non_aggregates;
41 std::vector<BenchmarkReporter::Run> aggregates_only;
43 bool display_report_aggregates_only =
false;
44 bool file_report_aggregates_only =
false;
52 int GetNumRepeats()
const {
return repeats; }
54 bool HasRepeatsRemaining()
const {
55 return GetNumRepeats() != num_repetitions_done;
58 void DoOneRepetition();
63 return reports_for_family;
72 const double min_time;
73 const double min_warmup_time;
76 const bool has_explicit_iteration_count;
78 int num_repetitions_done = 0;
80 std::vector<std::thread> pool;
82 std::vector<MemoryManager::Result> memory_results;
91 struct IterationResults {
96 IterationResults DoNIterations();
98 IterationCount PredictNumItersNeeded(
const IterationResults& i)
const;
100 bool ShouldReportIterationResults(
const IterationResults& i)
const;
102 double GetMinTimeToApply()
const;
104 void FinishWarmUp(
const IterationCount& i);
Definition: benchmark_api_internal.h:18
Definition: benchmark_runner.h:47
Definition: perf_counters.h:134
Definition: benchmark.h:1703
Definition: benchmark_runner.h:39
Definition: thread_manager.h:39