• Home
  • Raw
  • Download

Lines Matching full:benchmark

1 #include "benchmark/benchmark.h"
54 static void BM_Factorial(benchmark::State& state) { in BM_Factorial()
62 BENCHMARK(BM_Factorial);
63 BENCHMARK(BM_Factorial)->UseRealTime();
65 static void BM_CalculatePiRange(benchmark::State& state) { in BM_CalculatePiRange()
74 static void BM_CalculatePi(benchmark::State& state) { in BM_CalculatePi()
77 benchmark::DoNotOptimize(CalculatePi(static_cast<int>(depth))); in BM_CalculatePi()
80 BENCHMARK(BM_CalculatePi)->Threads(8);
81 BENCHMARK(BM_CalculatePi)->ThreadRange(1, 32);
82 BENCHMARK(BM_CalculatePi)->ThreadPerCpu();
84 static void BM_SetInsert(benchmark::State& state) { in BM_SetInsert()
97 // non-timed part of each iteration will make the benchmark take forever.
98 BENCHMARK(BM_SetInsert)->Ranges({{1 << 10, 8 << 10}, {128, 512}});
102 static void BM_Sequential(benchmark::State& state) { in BM_Sequential()
120 static void BM_StringCompare(benchmark::State& state) { in BM_StringCompare()
124 for (auto _ : state) benchmark::DoNotOptimize(s1.compare(s2)); in BM_StringCompare()
126 BENCHMARK(BM_StringCompare)->Range(1, 1 << 20);
128 static void BM_SetupTeardown(benchmark::State& state) { in BM_SetupTeardown()
146 BENCHMARK(BM_SetupTeardown)->ThreadPerCpu();
148 static void BM_LongTest(benchmark::State& state) { in BM_LongTest()
152 benchmark::DoNotOptimize(tracker += i); in BM_LongTest()
155 BENCHMARK(BM_LongTest)->Range(1 << 16, 1 << 28);
157 static void BM_ParallelMemset(benchmark::State& state) { in BM_ParallelMemset()
171 benchmark::DoNotOptimize(test_vector->at(i) = 1); in BM_ParallelMemset()
179 BENCHMARK(BM_ParallelMemset)->Arg(10 << 20)->ThreadRange(1, 4);
181 static void BM_ManualTiming(benchmark::State& state) { in BM_ManualTiming()
202 BENCHMARK(BM_ManualTiming)->Range(1, 1 << 14)->UseRealTime();
203 BENCHMARK(BM_ManualTiming)->Range(1, 1 << 14)->UseManualTime();
208 void BM_with_args(benchmark::State& state, Args&&...) { in BM_with_args()
216 void BM_non_template_args(benchmark::State& state, int, double) { in BM_non_template_args()
223 static void BM_DenseThreadRanges(benchmark::State& st) { in BM_DenseThreadRanges()
241 BENCHMARK(BM_DenseThreadRanges)->Arg(1)->DenseThreadRange(1, 3);
242 BENCHMARK(BM_DenseThreadRanges)->Arg(2)->DenseThreadRange(1, 4, 2);
243 BENCHMARK(BM_DenseThreadRanges)->Arg(3)->DenseThreadRange(5, 14, 3);