#include "benchmark_register.h"
#ifndef BENCHMARK_OS_WINDOWS
#if !defined(BENCHMARK_OS_FUCHSIA) && !defined(BENCHMARK_OS_QURT)
#include <sys/resource.h>
#endif
#include <sys/time.h>
#include <unistd.h>
#endif
#include <algorithm>
#include <atomic>
#include <cinttypes>
#include <condition_variable>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <memory>
#include <numeric>
#include <sstream>
#include <thread>
#include "benchmark/benchmark.h"
#include "benchmark_api_internal.h"
#include "check.h"
#include "commandlineflags.h"
#include "complexity.h"
#include "internal_macros.h"
#include "log.h"
#include "mutex.h"
#include "re.h"
#include "statistics.h"
#include "string_util.h"
#include "timers.h"
namespace benchmark {
namespace {
static constexpr int kRangeMultiplier = …;
static constexpr size_t kMaxFamilySize = …;
static constexpr char kDisabledPrefix[] = …;
}
namespace internal {
class BenchmarkFamilies { … };
BenchmarkFamilies* BenchmarkFamilies::GetInstance() { … }
size_t BenchmarkFamilies::AddBenchmark(std::unique_ptr<Benchmark> family) { … }
void BenchmarkFamilies::ClearBenchmarks() { … }
bool BenchmarkFamilies::FindBenchmarks(
std::string spec, std::vector<BenchmarkInstance>* benchmarks,
std::ostream* ErrStream) { … }
Benchmark* RegisterBenchmarkInternal(Benchmark* bench) { … }
bool FindBenchmarksInternal(const std::string& re,
std::vector<BenchmarkInstance>* benchmarks,
std::ostream* Err) { … }
Benchmark::Benchmark(const std::string& name)
: … { … }
Benchmark::~Benchmark() { … }
Benchmark* Benchmark::Name(const std::string& name) { … }
Benchmark* Benchmark::Arg(int64_t x) { … }
Benchmark* Benchmark::Unit(TimeUnit unit) { … }
Benchmark* Benchmark::Range(int64_t start, int64_t limit) { … }
Benchmark* Benchmark::Ranges(
const std::vector<std::pair<int64_t, int64_t>>& ranges) { … }
Benchmark* Benchmark::ArgsProduct(
const std::vector<std::vector<int64_t>>& arglists) { … }
Benchmark* Benchmark::ArgName(const std::string& name) { … }
Benchmark* Benchmark::ArgNames(const std::vector<std::string>& names) { … }
Benchmark* Benchmark::DenseRange(int64_t start, int64_t limit, int step) { … }
Benchmark* Benchmark::Args(const std::vector<int64_t>& args) { … }
Benchmark* Benchmark::Apply(void (*custom_arguments)(Benchmark* benchmark)) { … }
Benchmark* Benchmark::Setup(void (*setup)(const benchmark::State&)) { … }
Benchmark* Benchmark::Teardown(void (*teardown)(const benchmark::State&)) { … }
Benchmark* Benchmark::RangeMultiplier(int multiplier) { … }
Benchmark* Benchmark::MinTime(double t) { … }
Benchmark* Benchmark::MinWarmUpTime(double t) { … }
Benchmark* Benchmark::Iterations(IterationCount n) { … }
Benchmark* Benchmark::Repetitions(int n) { … }
Benchmark* Benchmark::ReportAggregatesOnly(bool value) { … }
Benchmark* Benchmark::DisplayAggregatesOnly(bool value) { … }
Benchmark* Benchmark::MeasureProcessCPUTime() { … }
Benchmark* Benchmark::UseRealTime() { … }
Benchmark* Benchmark::UseManualTime() { … }
Benchmark* Benchmark::Complexity(BigO complexity) { … }
Benchmark* Benchmark::Complexity(BigOFunc* complexity) { … }
Benchmark* Benchmark::ComputeStatistics(const std::string& name,
StatisticsFunc* statistics,
StatisticUnit unit) { … }
Benchmark* Benchmark::Threads(int t) { … }
Benchmark* Benchmark::ThreadRange(int min_threads, int max_threads) { … }
Benchmark* Benchmark::DenseThreadRange(int min_threads, int max_threads,
int stride) { … }
Benchmark* Benchmark::ThreadPerCpu() { … }
void Benchmark::SetName(const std::string& name) { … }
const char* Benchmark::GetName() const { … }
int Benchmark::ArgsCnt() const { … }
const char* Benchmark::GetArgName(int arg) const { … }
TimeUnit Benchmark::GetTimeUnit() const { … }
void FunctionBenchmark::Run(State& st) { … }
}
void ClearRegisteredBenchmarks() { … }
std::vector<int64_t> CreateRange(int64_t lo, int64_t hi, int multi) { … }
std::vector<int64_t> CreateDenseRange(int64_t start, int64_t limit, int step) { … }
}