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"
30 extern MemoryManager* memory_manager;
31 extern ProfilerManager* profiler_manager;
34 std::vector<BenchmarkReporter::Run> non_aggregates;
35 std::vector<BenchmarkReporter::Run> aggregates_only;
37 bool display_report_aggregates_only =
false;
38 bool file_report_aggregates_only =
false;
42 enum { ITERS, TIME } tag;
58 int GetNumRepeats()
const {
return repeats; }
60 bool HasRepeatsRemaining()
const {
61 return GetNumRepeats() != num_repetitions_done;
64 void DoOneRepetition();
69 return reports_for_family;
72 double GetMinTime()
const {
return min_time; }
74 bool HasExplicitIters()
const {
return has_explicit_iteration_count; }
76 IterationCount GetIters()
const {
return iters; }
85 const double min_time;
86 const double min_warmup_time;
89 const bool has_explicit_iteration_count;
91 int num_repetitions_done = 0;
93 std::vector<std::thread> pool;
95 std::vector<MemoryManager::Result> memory_results;
103 struct IterationResults {
105 IterationCount iters;
108 IterationResults DoNIterations();
112 void RunProfilerManager();
114 IterationCount PredictNumItersNeeded(
const IterationResults& i)
const;
116 bool ShouldReportIterationResults(
const IterationResults& i)
const;
118 double GetMinTimeToApply()
const;
120 void FinishWarmUp(
const IterationCount& i);
Definition: benchmark_api_internal.h:18
Definition: benchmark_runner.h:52
Definition: perf_counters.h:149
Definition: benchmark.h:1931
Definition: benchmark.h:421
Definition: benchmark_runner.h:41
Definition: benchmark_runner.h:33
Definition: thread_manager.h:39