libcxx

libcxx mirror with random patches
git clone https://git.neptards.moe/neptards/libcxx.git
Log | Files | Refs

benchmark_api_internal.h (1341B)


      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   std::string 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 use_real_time;
     26   bool use_manual_time;
     27   BigO complexity;
     28   BigOFunc* complexity_lambda;
     29   UserCounters counters;
     30   const std::vector<Statistics>* statistics;
     31   bool last_benchmark_instance;
     32   int repetitions;
     33   double min_time;
     34   size_t iterations;
     35   int threads;  // Number of concurrent threads to us
     36 
     37   State Run(size_t iters, int thread_id, internal::ThreadTimer* timer,
     38             internal::ThreadManager* manager) const;
     39 };
     40 
     41 bool FindBenchmarksInternal(const std::string& re,
     42                             std::vector<BenchmarkInstance>* benchmarks,
     43                             std::ostream* Err);
     44 
     45 bool IsZero(double n);
     46 
     47 ConsoleReporter::OutputOptions GetOutputOptions(bool force_no_color = false);
     48 
     49 }  // end namespace internal
     50 }  // end namespace benchmark
     51 
     52 #endif  // BENCHMARK_API_INTERNAL_H