Eric Fiselier | fbc9ff2 | 2016-11-05 00:30:27 +0000 | [diff] [blame] | 1 | #ifndef BENCHMARK_API_INTERNAL_H |
| 2 | #define BENCHMARK_API_INTERNAL_H |
| 3 | |
Eric Fiselier | 1903976 | 2018-01-18 04:23:01 +0000 | [diff] [blame] | 4 | #include "benchmark/benchmark.h" |
Eric Fiselier | fbc9ff2 | 2016-11-05 00:30:27 +0000 | [diff] [blame] | 5 | |
| 6 | #include <cmath> |
| 7 | #include <iosfwd> |
| 8 | #include <limits> |
| 9 | #include <string> |
| 10 | #include <vector> |
| 11 | |
| 12 | namespace benchmark { |
| 13 | namespace internal { |
| 14 | |
| 15 | // Information kept per benchmark we may want to run |
| 16 | struct Benchmark::Instance { |
| 17 | std::string name; |
| 18 | Benchmark* benchmark; |
| 19 | ReportMode report_mode; |
| 20 | std::vector<int> arg; |
| 21 | TimeUnit time_unit; |
| 22 | int range_multiplier; |
| 23 | bool use_real_time; |
| 24 | bool use_manual_time; |
| 25 | BigO complexity; |
| 26 | BigOFunc* complexity_lambda; |
Eric Fiselier | 133a720 | 2017-04-18 07:17:20 +0000 | [diff] [blame] | 27 | UserCounters counters; |
Eric Fiselier | 1903976 | 2018-01-18 04:23:01 +0000 | [diff] [blame] | 28 | const std::vector<Statistics>* statistics; |
Eric Fiselier | fbc9ff2 | 2016-11-05 00:30:27 +0000 | [diff] [blame] | 29 | bool last_benchmark_instance; |
| 30 | int repetitions; |
| 31 | double min_time; |
Eric Fiselier | 133a720 | 2017-04-18 07:17:20 +0000 | [diff] [blame] | 32 | size_t iterations; |
Eric Fiselier | fbc9ff2 | 2016-11-05 00:30:27 +0000 | [diff] [blame] | 33 | int threads; // Number of concurrent threads to us |
| 34 | }; |
| 35 | |
| 36 | bool FindBenchmarksInternal(const std::string& re, |
| 37 | std::vector<Benchmark::Instance>* benchmarks, |
| 38 | std::ostream* Err); |
| 39 | |
Eric Fiselier | 1903976 | 2018-01-18 04:23:01 +0000 | [diff] [blame] | 40 | bool IsZero(double n); |
Eric Fiselier | fbc9ff2 | 2016-11-05 00:30:27 +0000 | [diff] [blame] | 41 | |
Eric Fiselier | 1903976 | 2018-01-18 04:23:01 +0000 | [diff] [blame] | 42 | ConsoleReporter::OutputOptions GetOutputOptions(bool force_no_color = false); |
Eric Fiselier | fbc9ff2 | 2016-11-05 00:30:27 +0000 | [diff] [blame] | 43 | |
Eric Fiselier | fbc9ff2 | 2016-11-05 00:30:27 +0000 | [diff] [blame] | 44 | } // end namespace internal |
| 45 | } // end namespace benchmark |
| 46 | |
| 47 | #endif // BENCHMARK_API_INTERNAL_H |