Home
last modified time | relevance | path

Searched full:benchmark (Results 1 – 25 of 1656) sorted by relevance

12345678910>>...67

/third_party/abseil-cpp/absl/time/
Dduration_benchmark.cc22 #include "benchmark/benchmark.h"
30 void BM_Duration_Factory_Nanoseconds(benchmark::State& state) { in BM_Duration_Factory_Nanoseconds()
33 benchmark::DoNotOptimize(absl::Nanoseconds(i)); in BM_Duration_Factory_Nanoseconds()
37 BENCHMARK(BM_Duration_Factory_Nanoseconds);
39 void BM_Duration_Factory_Microseconds(benchmark::State& state) { in BM_Duration_Factory_Microseconds()
42 benchmark::DoNotOptimize(absl::Microseconds(i)); in BM_Duration_Factory_Microseconds()
46 BENCHMARK(BM_Duration_Factory_Microseconds);
48 void BM_Duration_Factory_Milliseconds(benchmark::State& state) { in BM_Duration_Factory_Milliseconds()
51 benchmark::DoNotOptimize(absl::Milliseconds(i)); in BM_Duration_Factory_Milliseconds()
55 BENCHMARK(BM_Duration_Factory_Milliseconds);
[all …]
Dtime_benchmark.cc29 #include "benchmark/benchmark.h"
37 void BM_Time_Arithmetic(benchmark::State& state) { in BM_Time_Arithmetic()
42 benchmark::DoNotOptimize(t += nano); in BM_Time_Arithmetic()
43 benchmark::DoNotOptimize(t -= sec); in BM_Time_Arithmetic()
46 BENCHMARK(BM_Time_Arithmetic);
52 void BM_Time_Difference(benchmark::State& state) { in BM_Time_Difference()
57 benchmark::DoNotOptimize(diff += end - start); in BM_Time_Difference()
60 BENCHMARK(BM_Time_Difference);
65 // In each "ToDateTime" benchmark we switch between two instants
72 void BM_Time_ToDateTime_Absl(benchmark::State& state) { in BM_Time_ToDateTime_Absl()
[all …]
/third_party/skia/third_party/externals/abseil-cpp/absl/time/
Dduration_benchmark.cc23 #include "benchmark/benchmark.h"
35 void BM_Duration_Factory_Nanoseconds(benchmark::State& state) { in BM_Duration_Factory_Nanoseconds()
38 benchmark::DoNotOptimize(absl::Nanoseconds(i)); in BM_Duration_Factory_Nanoseconds()
42 BENCHMARK(BM_Duration_Factory_Nanoseconds);
44 void BM_Duration_Factory_Microseconds(benchmark::State& state) { in BM_Duration_Factory_Microseconds()
47 benchmark::DoNotOptimize(absl::Microseconds(i)); in BM_Duration_Factory_Microseconds()
51 BENCHMARK(BM_Duration_Factory_Microseconds);
53 void BM_Duration_Factory_Milliseconds(benchmark::State& state) { in BM_Duration_Factory_Milliseconds()
56 benchmark::DoNotOptimize(absl::Milliseconds(i)); in BM_Duration_Factory_Milliseconds()
60 BENCHMARK(BM_Duration_Factory_Milliseconds);
[all …]
Dtime_benchmark.cc29 #include "benchmark/benchmark.h"
37 void BM_Time_Arithmetic(benchmark::State& state) { in BM_Time_Arithmetic()
42 benchmark::DoNotOptimize(t += nano); in BM_Time_Arithmetic()
43 benchmark::DoNotOptimize(t -= sec); in BM_Time_Arithmetic()
46 BENCHMARK(BM_Time_Arithmetic);
52 void BM_Time_Difference(benchmark::State& state) { in BM_Time_Difference()
57 benchmark::DoNotOptimize(diff += end - start); in BM_Time_Difference()
60 BENCHMARK(BM_Time_Difference);
65 // In each "ToDateTime" benchmark we switch between two instants
72 void BM_Time_ToDateTime_Absl(benchmark::State& state) { in BM_Time_ToDateTime_Absl()
[all …]
/third_party/benchmark/test/
Dbasic_test.cc2 #include "benchmark/benchmark.h"
4 #define BASIC_BENCHMARK_TEST(x) BENCHMARK(x)->Arg(8)->Arg(512)->Arg(8192)
6 void BM_empty(benchmark::State& state) { in BM_empty()
8 benchmark::DoNotOptimize(state.iterations()); in BM_empty()
11 BENCHMARK(BM_empty);
12 BENCHMARK(BM_empty)->ThreadPerCpu();
14 void BM_spin_empty(benchmark::State& state) { in BM_spin_empty()
17 benchmark::DoNotOptimize(x); in BM_spin_empty()
24 void BM_spin_pause_before(benchmark::State& state) { in BM_spin_pause_before()
26 benchmark::DoNotOptimize(i); in BM_spin_pause_before()
[all …]
Doptions_test.cc4 #include "benchmark/benchmark.h"
11 void BM_basic(benchmark::State& state) { in BM_basic()
16 void BM_basic_slow(benchmark::State& state) { in BM_basic_slow()
24 BENCHMARK(BM_basic);
25 BENCHMARK(BM_basic)->Arg(42);
26 BENCHMARK(BM_basic_slow)->Arg(10)->Unit(benchmark::kNanosecond);
27 BENCHMARK(BM_basic_slow)->Arg(100)->Unit(benchmark::kMicrosecond);
28 BENCHMARK(BM_basic_slow)->Arg(1000)->Unit(benchmark::kMillisecond);
29 BENCHMARK(BM_basic_slow)->Arg(1000)->Unit(benchmark::kSecond);
30 BENCHMARK(BM_basic)->Range(1, 8);
[all …]
Dinternal_threading_test.cc8 #include "benchmark/benchmark.h"
18 const auto start = benchmark::ChronoClockNow(); in MyBusySpinwait()
21 const auto now = benchmark::ChronoClockNow(); in MyBusySpinwait()
37 void BM_MainThread(benchmark::State& state) { in BM_MainThread()
43 benchmark::Counter{1, benchmark::Counter::kIsRate}; in BM_MainThread()
46 BENCHMARK(BM_MainThread)->Iterations(1)->Threads(1);
47 BENCHMARK(BM_MainThread)->Iterations(1)->Threads(1)->UseRealTime();
48 BENCHMARK(BM_MainThread)->Iterations(1)->Threads(1)->UseManualTime();
49 BENCHMARK(BM_MainThread)->Iterations(1)->Threads(1)->MeasureProcessCPUTime();
50 BENCHMARK(BM_MainThread)
[all …]
/third_party/abseil-cpp/absl/strings/
Dcharconv_benchmark.cc21 #include "benchmark/benchmark.h"
25 void BM_Strtod_Pi(benchmark::State& state) { in BM_Strtod_Pi()
28 benchmark::DoNotOptimize(pi); in BM_Strtod_Pi()
29 benchmark::DoNotOptimize(strtod(pi, nullptr)); in BM_Strtod_Pi()
32 BENCHMARK(BM_Strtod_Pi);
34 void BM_Absl_Pi(benchmark::State& state) { in BM_Absl_Pi()
38 benchmark::DoNotOptimize(pi); in BM_Absl_Pi()
41 benchmark::DoNotOptimize(v); in BM_Absl_Pi()
44 BENCHMARK(BM_Absl_Pi);
46 void BM_Strtod_Pi_float(benchmark::State& state) { in BM_Strtod_Pi_float()
[all …]
Dstring_view_benchmark.cc25 #include "benchmark/benchmark.h"
33 void BM_StringViewFromString(benchmark::State& state) { in BM_StringViewFromString()
42 benchmark::DoNotOptimize(ps); in BM_StringViewFromString()
43 benchmark::DoNotOptimize(psv); in BM_StringViewFromString()
46 benchmark::DoNotOptimize(sv); in BM_StringViewFromString()
49 BENCHMARK(BM_StringViewFromString)->Arg(12)->Arg(128);
59 void DoEqualityComparisons(benchmark::State& state, absl::string_view a, in DoEqualityComparisons()
62 benchmark::DoNotOptimize(a == b); in DoEqualityComparisons()
66 void BM_EqualIdentical(benchmark::State& state) { in BM_EqualIdentical()
70 BENCHMARK(BM_EqualIdentical)->DenseRange(0, 3)->Range(4, 1 << 10);
[all …]
/third_party/skia/third_party/externals/abseil-cpp/absl/strings/
Dcharconv_benchmark.cc21 #include "benchmark/benchmark.h"
25 void BM_Strtod_Pi(benchmark::State& state) { in BM_Strtod_Pi()
28 benchmark::DoNotOptimize(pi); in BM_Strtod_Pi()
29 benchmark::DoNotOptimize(strtod(pi, nullptr)); in BM_Strtod_Pi()
32 BENCHMARK(BM_Strtod_Pi);
34 void BM_Absl_Pi(benchmark::State& state) { in BM_Absl_Pi()
38 benchmark::DoNotOptimize(pi); in BM_Absl_Pi()
41 benchmark::DoNotOptimize(v); in BM_Absl_Pi()
44 BENCHMARK(BM_Absl_Pi);
46 void BM_Strtod_Pi_float(benchmark::State& state) { in BM_Strtod_Pi_float()
[all …]
Dstring_view_benchmark.cc25 #include "benchmark/benchmark.h"
33 void BM_StringViewFromString(benchmark::State& state) { in BM_StringViewFromString()
42 benchmark::DoNotOptimize(ps); in BM_StringViewFromString()
43 benchmark::DoNotOptimize(psv); in BM_StringViewFromString()
46 benchmark::DoNotOptimize(sv); in BM_StringViewFromString()
49 BENCHMARK(BM_StringViewFromString)->Arg(12)->Arg(128);
59 void DoEqualityComparisons(benchmark::State& state, absl::string_view a, in DoEqualityComparisons()
62 benchmark::DoNotOptimize(a == b); in DoEqualityComparisons()
66 void BM_EqualIdentical(benchmark::State& state) { in BM_EqualIdentical()
70 BENCHMARK(BM_EqualIdentical)->DenseRange(0, 3)->Range(4, 1 << 10);
[all …]
/third_party/benchmark/
DREADME.md1 # Benchmark chapter
3 …nd-test](https://github.com/google/benchmark/workflows/build-and-test/badge.svg)](https://github.c…
4 …[bazel](https://github.com/google/benchmark/actions/workflows/bazel.yml/badge.svg)](https://github…
5 [![pylint](https://github.com/google/benchmark/workflows/pylint/badge.svg)](https://github.com/goog…
6 …bindings](https://github.com/google/benchmark/workflows/test-bindings/badge.svg)](https://github.c…
8 …uild Status](https://travis-ci.org/google/benchmark.svg?branch=master)](https://travis-ci.org/goog…
9 …age Status](https://coveralls.io/repos/google/benchmark/badge.svg)](https://coveralls.io/r/google/
12 A library to benchmark code snippets, similar to unit tests. Example:
15 #include <benchmark/benchmark.h>
17 static void BM_SomeFunction(benchmark::State& state) {
[all …]
/third_party/skia/third_party/externals/abseil-cpp/absl/strings/internal/
Dmemutil_benchmark.cc20 #include "benchmark/benchmark.h"
28 // We benchmark case-sensitive and case-insensitive versions of
42 // Benchmark Time CPU Iterations
97 void BM_Memmem(benchmark::State& state) { in BM_Memmem()
99 benchmark::DoNotOptimize( in BM_Memmem()
104 BENCHMARK(BM_Memmem);
106 void BM_MemmemMedium(benchmark::State& state) { in BM_MemmemMedium()
108 benchmark::DoNotOptimize( in BM_MemmemMedium()
113 BENCHMARK(BM_MemmemMedium);
115 void BM_MemmemPathological(benchmark::State& state) { in BM_MemmemPathological()
[all …]
/third_party/abseil-cpp/absl/strings/internal/
Dmemutil_benchmark.cc20 #include "benchmark/benchmark.h"
28 // We benchmark case-sensitive and case-insensitive versions of
42 // Benchmark Time CPU Iterations
97 void BM_Memmem(benchmark::State& state) { in BM_Memmem()
99 benchmark::DoNotOptimize( in BM_Memmem()
104 BENCHMARK(BM_Memmem);
106 void BM_MemmemMedium(benchmark::State& state) { in BM_MemmemMedium()
108 benchmark::DoNotOptimize( in BM_MemmemMedium()
113 BENCHMARK(BM_MemmemMedium);
115 void BM_MemmemPathological(benchmark::State& state) { in BM_MemmemPathological()
[all …]
/third_party/benchmark/src/
Dbenchmark_register.cc39 #include "benchmark/benchmark.h"
52 namespace benchmark { namespace
57 // The size of a benchmark family determines is the number of inputs to repeat
58 // the benchmark on. If this is "large" then warn the user during configuration.
69 // benchmark identifies a family of related benchmarks to run.
74 // Registers a benchmark family and returns the index assigned to it.
75 size_t AddBenchmark(std::unique_ptr<Benchmark> family);
77 // Clear all registered benchmark families.
80 // Extract the list of benchmark instances that match the specified
89 std::vector<std::unique_ptr<Benchmark>> families_;
[all …]
/third_party/json/benchmarks/thirdparty/benchmark/include/benchmark/
Dbenchmark.h20 static void BM_StringCreation(benchmark::State& state) {
25 // Register the function as a benchmark
26 BENCHMARK(BM_StringCreation);
28 // Define another benchmark
29 static void BM_StringCopy(benchmark::State& state) {
34 BENCHMARK(BM_StringCopy);
43 benchmark::Initialize(&argc, argv);
44 benchmark::RunSpecifiedBenchmarks();
54 static void BM_memcpy(benchmark::State& state) {
63 BENCHMARK(BM_memcpy)->Arg(8)->Arg(64)->Arg(512)->Arg(1<<10)->Arg(8<<10);
[all …]
/third_party/json/benchmarks/thirdparty/benchmark/src/
Dbenchmark_register.cc37 #include "benchmark/benchmark.h"
50 namespace benchmark { namespace
55 // The size of a benchmark family determines is the number of inputs to repeat
56 // the benchmark on. If this is "large" then warn the user during configuration.
67 // benchmark identifies a family of related benchmarks to run.
72 // Registers a benchmark family and returns the index assigned to it.
73 size_t AddBenchmark(std::unique_ptr<Benchmark> family);
75 // Clear all registered benchmark families.
78 // Extract the list of benchmark instances that match the specified
81 std::vector<Benchmark::Instance>* benchmarks,
[all …]
/third_party/re2/re2/testing/
Dregexp_benchmark.cc14 #include "util/benchmark.h"
128 typedef void SearchImpl(benchmark::State& state, const char* regexp,
136 typedef void ParseImpl(benchmark::State& state, const char* regexp,
151 // Benchmark: failed search for regexp in random text.
170 void Search(benchmark::State& state, const char* regexp, SearchImpl* search) { in Search()
200 void Search_Easy0_CachedDFA(benchmark::State& state) { Search(state, EASY0, SearchCachedDFA); } in Search_Easy0_CachedDFA()
201 void Search_Easy0_CachedNFA(benchmark::State& state) { Search(state, EASY0, SearchCachedNFA); } in Search_Easy0_CachedNFA()
202 void Search_Easy0_CachedPCRE(benchmark::State& state) { Search(state, EASY0, SearchCachedPCRE); } in Search_Easy0_CachedPCRE()
203 void Search_Easy0_CachedRE2(benchmark::State& state) { Search(state, EASY0, SearchCachedRE2); } in Search_Easy0_CachedRE2()
212 void Search_Easy1_CachedDFA(benchmark::State& state) { Search(state, EASY1, SearchCachedDFA); } in Search_Easy1_CachedDFA()
[all …]
/third_party/grpc/test/cpp/microbenchmarks/
Dbm_metadata.cc21 #include <benchmark/benchmark.h>
32 static void BM_SliceFromStatic(benchmark::State& state) { in BM_SliceFromStatic()
35 benchmark::DoNotOptimize(grpc_core::ExternallyManagedSlice("abc")); in BM_SliceFromStatic()
39 BENCHMARK(BM_SliceFromStatic);
41 static void BM_SliceFromCopied(benchmark::State& state) { in BM_SliceFromCopied()
48 BENCHMARK(BM_SliceFromCopied);
50 static void BM_SliceIntern(benchmark::State& state) { in BM_SliceIntern()
58 BENCHMARK(BM_SliceIntern);
60 static void BM_SliceReIntern(benchmark::State& state) { in BM_SliceReIntern()
70 BENCHMARK(BM_SliceReIntern);
[all …]
/third_party/benchmark/docs/
Duser_guide.md25 [Custom Benchmark Name](#custom-benchmark-name)
53 [Using RegisterBenchmark](#using-register-benchmark)
76 Benchmark Time(ns) CPU(ns) Iterations
86 The `benchmarks` attribute contains a list of every benchmark run. Example json
141 Write benchmark results to a file with the `--benchmark_out=<filename>` option
146 [is not parsable](https://github.com/google/benchmark/issues/794) by csv
175 Benchmark Time CPU Iterations
202 pwd: /home/user/benchmark/
203 Benchmark Time CPU Iterations
212 benchmark::AddCustomContext("foo", "bar");
[all …]
/third_party/abseil-cpp/absl/container/
Dinlined_vector_benchmark.cc19 #include "benchmark/benchmark.h"
27 void BM_InlinedVectorFill(benchmark::State& state) { in BM_InlinedVectorFill()
36 benchmark::DoNotOptimize(v); in BM_InlinedVectorFill()
39 BENCHMARK(BM_InlinedVectorFill)->Range(1, 256);
41 void BM_InlinedVectorFillRange(benchmark::State& state) { in BM_InlinedVectorFillRange()
47 benchmark::DoNotOptimize(src); in BM_InlinedVectorFillRange()
49 benchmark::DoNotOptimize(v); in BM_InlinedVectorFillRange()
52 BENCHMARK(BM_InlinedVectorFillRange)->Range(1, 256);
54 void BM_StdVectorFill(benchmark::State& state) { in BM_StdVectorFill()
63 benchmark::DoNotOptimize(v); in BM_StdVectorFill()
[all …]
/third_party/benchmark/include/benchmark/
Dbenchmark.h20 static void BM_StringCreation(benchmark::State& state) {
25 // Register the function as a benchmark
26 BENCHMARK(BM_StringCreation);
28 // Define another benchmark
29 static void BM_StringCopy(benchmark::State& state) {
34 BENCHMARK(BM_StringCopy);
43 benchmark::Initialize(&argc, argv);
44 benchmark::RunSpecifiedBenchmarks();
45 benchmark::Shutdown();
55 static void BM_memcpy(benchmark::State& state) {
[all …]
/third_party/abseil-cpp/absl/functional/
Dfunction_ref_benchmark.cc19 #include "benchmark/benchmark.h"
28 void FreeFunction() { benchmark::DoNotOptimize(dummy); } in FreeFunction()
31 void operator()() const { benchmark::DoNotOptimize(dummy); } in operator ()()
35 void operator()() const { benchmark::DoNotOptimize(this); } in operator ()()
45 void ConstructAndCallFunctionBenchmark(benchmark::State& state, in ConstructAndCallFunctionBenchmark()
52 void BM_TrivialStdFunction(benchmark::State& state) { in BM_TrivialStdFunction()
56 BENCHMARK(BM_TrivialStdFunction);
58 void BM_TrivialFunctionRef(benchmark::State& state) { in BM_TrivialFunctionRef()
62 BENCHMARK(BM_TrivialFunctionRef);
64 void BM_LargeStdFunction(benchmark::State& state) { in BM_LargeStdFunction()
[all …]
/third_party/skia/third_party/externals/abseil-cpp/absl/functional/
Dfunction_ref_benchmark.cc19 #include "benchmark/benchmark.h"
28 void FreeFunction() { benchmark::DoNotOptimize(dummy); } in FreeFunction()
31 void operator()() const { benchmark::DoNotOptimize(dummy); } in operator ()()
35 void operator()() const { benchmark::DoNotOptimize(this); } in operator ()()
45 void ConstructAndCallFunctionBenchmark(benchmark::State& state, in ConstructAndCallFunctionBenchmark()
52 void BM_TrivialStdFunction(benchmark::State& state) { in BM_TrivialStdFunction()
56 BENCHMARK(BM_TrivialStdFunction);
58 void BM_TrivialFunctionRef(benchmark::State& state) { in BM_TrivialFunctionRef()
62 BENCHMARK(BM_TrivialFunctionRef);
64 void BM_LargeStdFunction(benchmark::State& state) { in BM_LargeStdFunction()
[all …]
/third_party/protobuf/benchmarks/
DREADME.md16 You need to install [cmake](https://cmake.org/) before building the benchmark.
18 We are using [google/benchmark](https://github.com/google/benchmark) as the
19 benchmark tool for testing cpp. This will be automatically made during build the
20 cpp benchmark.
30 [google/caliper](https://github.com/google/caliper) as benchmark tool, which
38 protobuf's benchmark. e.g. under Ubuntu, you need to
62 PHP benchmark's requirement is the same as PHP protobuf's requirements. The benchmark will automati…
66benchmark need [node](https://nodejs.org/en/)(higher than V6) and [npm](https://www.npmjs.com/) pa…
69 The C# benchmark code is built as part of the main Google.Protobuf
84 benchmark directory.
[all …]

12345678910>>...67