1 #ifndef BENCHMARK_API_INTERNAL_H
2 #define BENCHMARK_API_INTERNAL_H
3 
4 #include "benchmark/benchmark.h"
5 #include "commandlineflags.h"
6 
7 #include <cmath>
8 #include <iosfwd>
9 #include <limits>
10 #include <memory>
11 #include <string>
12 #include <vector>
13 
14 namespace benchmark {
15 namespace internal {
16 
17 // Information kept per benchmark we may want to run
18 struct BenchmarkInstance {
19   BenchmarkName name;
20   Benchmark* benchmark;
21   AggregationReportMode aggregation_report_mode;
22   std::vector<int64_t> arg;
23   TimeUnit time_unit;
24   int range_multiplier;
25   bool measure_process_cpu_time;
26   bool use_real_time;
27   bool use_manual_time;
28   BigO complexity;
29   BigOFunc* complexity_lambda;
30   UserCounters counters;
31   const std::vector<Statistics>* statistics;
32   bool last_benchmark_instance;
33   int repetitions;
34   double min_time;
35   IterationCount iterations;
36   int threads;  // Number of concurrent threads to us
37 
38   State Run(IterationCount iters, int thread_id, internal::ThreadTimer* timer,
39             internal::ThreadManager* manager) const;
40 };
41 
42 bool FindBenchmarksInternal(const std::string& re,
43                             std::vector<BenchmarkInstance>* benchmarks,
44                             std::ostream* Err);
45 
46 bool IsZero(double n);
47 
48 ConsoleReporter::OutputOptions GetOutputOptions(bool force_no_color = false);
49 
50 }  // end namespace internal
51 }  // end namespace benchmark
52 
53 #endif  // BENCHMARK_API_INTERNAL_H
54