grpc
third_party
benchmark
test
templated_fixture_test.cc
Go to the documentation of this file.
1
2
#include "benchmark/benchmark.h"
3
4
#include <cassert>
5
#include <memory>
6
7
template
<
typename
T>
8
class
MyFixture
:
public
::benchmark::Fixture
{
9
public
:
10
MyFixture
() :
data
(0) {}
11
12
T
data
;
13
};
14
15
BENCHMARK_TEMPLATE_F
(
MyFixture
,
Foo
,
int
)(
benchmark::State
& st) {
16
for
(
auto
_
: st) {
17
data
+= 1;
18
}
19
}
20
21
BENCHMARK_TEMPLATE_DEFINE_F
(
MyFixture
, Bar,
double
)(
benchmark::State
& st) {
22
for
(
auto
_
: st) {
23
data
+= 1.0;
24
}
25
}
26
BENCHMARK_REGISTER_F
(
MyFixture
, Bar);
27
28
BENCHMARK_MAIN
();
MyFixture::data
T data
Definition:
templated_fixture_test.cc:12
MyFixture
Definition:
templated_fixture_test.cc:8
T
#define T(upbtypeconst, upbtype, ctype, default_value)
benchmark::Fixture
Definition:
benchmark/include/benchmark/benchmark.h:1122
MyFixture::MyFixture
MyFixture()
Definition:
templated_fixture_test.cc:10
Foo
Definition:
abseil-cpp/absl/debugging/symbolize_test.cc:65
gmock_output_test._
_
Definition:
bloaty/third_party/googletest/googlemock/test/gmock_output_test.py:175
data
char data[kBufferLength]
Definition:
abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
BENCHMARK_TEMPLATE_F
BENCHMARK_TEMPLATE_F(MyFixture, Foo, int)(benchmark
Definition:
templated_fixture_test.cc:15
BENCHMARK_REGISTER_F
BENCHMARK_REGISTER_F(MyFixture, Bar)
benchmark::State
Definition:
benchmark/include/benchmark/benchmark.h:503
BENCHMARK_MAIN
BENCHMARK_MAIN()
BENCHMARK_TEMPLATE_DEFINE_F
BENCHMARK_TEMPLATE_DEFINE_F(MyFixture, Bar, double)(benchmark
Definition:
templated_fixture_test.cc:21
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:26