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"
28BM_DECLARE_double(benchmark_min_time);
29BM_DECLARE_int32(benchmark_repetitions);
30BM_DECLARE_bool(benchmark_report_aggregates_only);
31BM_DECLARE_bool(benchmark_display_aggregates_only);
32BM_DECLARE_string(benchmark_perf_counters);
36extern MemoryManager* memory_manager;
39 std::vector<BenchmarkReporter::Run> non_aggregates;
40 std::vector<BenchmarkReporter::Run> aggregates_only;
42 bool display_report_aggregates_only =
false;
43 bool file_report_aggregates_only =
false;
51 int GetNumRepeats()
const {
return repeats; }
53 bool HasRepeatsRemaining()
const {
54 return GetNumRepeats() != num_repetitions_done;
57 void DoOneRepetition();
62 return reports_for_family;
71 const double min_time;
73 const bool has_explicit_iteration_count;
75 int num_repetitions_done = 0;
77 std::vector<std::thread> pool;
79 std::vector<MemoryManager::Result> memory_results;
88 struct IterationResults {
93 IterationResults DoNIterations();
95 IterationCount PredictNumItersNeeded(
const IterationResults& i)
const;
97 bool ShouldReportIterationResults(
const IterationResults& i)
const;
Definition: benchmark_api_internal.h:18
Definition: benchmark_runner.h:46
Definition: perf_counters.h:125
Definition: benchmark.h:1598
Definition: benchmark_runner.h:38
Definition: thread_manager.h:39