Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
third_party
benchmark
test
memory_manager_test.cc
Go to the documentation of this file.
1
#include <memory>
2
3
#include "../src/check.h"
4
#include "benchmark/benchmark.h"
5
#include "
output_test.h
"
6
7
class
TestMemoryManager
:
public
benchmark::MemoryManager
{
8
void
Start
()
BENCHMARK_OVERRIDE
{}
9
void
Stop
(
Result
*
result
)
BENCHMARK_OVERRIDE
{
10
result
->num_allocs = 42;
11
result
->max_bytes_used = 42000;
12
}
13
};
14
15
void
BM_empty
(
benchmark::State
&
state
) {
16
for
(
auto
_
:
state
) {
17
benchmark::DoNotOptimize
(
state
.iterations());
18
}
19
}
20
BENCHMARK
(
BM_empty
);
21
22
ADD_CASES
(
TC_ConsoleOut
, {{
"^BM_empty %console_report$"
}});
23
ADD_CASES
(
TC_JSONOut
, {{
"\"name\": \"BM_empty\",$"
},
24
{
"\"family_index\": 0,$"
,
MR_Next
},
25
{
"\"per_family_instance_index\": 0,$"
,
MR_Next
},
26
{
"\"run_name\": \"BM_empty\",$"
,
MR_Next
},
27
{
"\"run_type\": \"iteration\",$"
,
MR_Next
},
28
{
"\"repetitions\": 1,$"
,
MR_Next
},
29
{
"\"repetition_index\": 0,$"
,
MR_Next
},
30
{
"\"threads\": 1,$"
,
MR_Next
},
31
{
"\"iterations\": %int,$"
,
MR_Next
},
32
{
"\"real_time\": %float,$"
,
MR_Next
},
33
{
"\"cpu_time\": %float,$"
,
MR_Next
},
34
{
"\"time_unit\": \"ns\",$"
,
MR_Next
},
35
{
"\"allocs_per_iter\": %float,$"
,
MR_Next
},
36
{
"\"max_bytes_used\": 42000$"
,
MR_Next
},
37
{
"}"
,
MR_Next
}});
38
ADD_CASES
(
TC_CSVOut
, {{
"^\"BM_empty\",%csv_report$"
}});
39
40
int
main
(
int
argc,
char
* argv[]) {
41
std::unique_ptr<benchmark::MemoryManager> mm(
new
TestMemoryManager
());
42
43
benchmark::RegisterMemoryManager
(mm.get());
44
RunOutputTests
(argc, argv);
45
benchmark::RegisterMemoryManager
(
nullptr
);
46
}
_gevent_test_main.result
result
Definition:
_gevent_test_main.py:96
benchmark::MemoryManager
Definition:
benchmark/include/benchmark/benchmark.h:1629
benchmark::RegisterMemoryManager
void RegisterMemoryManager(MemoryManager *memory_manager)
Definition:
benchmark/src/benchmark.cc:503
MR_Next
@ MR_Next
Definition:
benchmark/test/output_test.h:26
ADD_CASES
ADD_CASES(TC_ConsoleOut, {{"^BM_empty %console_report$"}})
benchmark::DoNotOptimize
BENCHMARK_ALWAYS_INLINE void DoNotOptimize(Tp const &value)
Definition:
benchmark/include/benchmark/benchmark.h:375
TC_CSVOut
@ TC_CSVOut
Definition:
benchmark/test/output_test.h:45
TC_JSONOut
@ TC_JSONOut
Definition:
benchmark/test/output_test.h:43
output_test.h
BENCHMARK
BENCHMARK(BM_empty)
TestMemoryManager
Definition:
memory_manager_test.cc:7
BENCHMARK_OVERRIDE
#define BENCHMARK_OVERRIDE
Definition:
benchmark/include/benchmark/benchmark.h:271
main
int main(int argc, char *argv[])
Definition:
memory_manager_test.cc:40
benchmark::MemoryManager::Result
Definition:
benchmark/include/benchmark/benchmark.h:1631
gmock_output_test._
_
Definition:
bloaty/third_party/googletest/googlemock/test/gmock_output_test.py:175
BM_empty
void BM_empty(benchmark::State &state)
Definition:
memory_manager_test.cc:15
TestMemoryManager::Stop
void Stop(Result *result) BENCHMARK_OVERRIDE
Definition:
memory_manager_test.cc:9
TC_ConsoleOut
@ TC_ConsoleOut
Definition:
benchmark/test/output_test.h:41
RunOutputTests
void RunOutputTests(int argc, char *argv[])
Definition:
benchmark/test/output_test_helper.cc:391
TestMemoryManager::Start
void Start() BENCHMARK_OVERRIDE
Definition:
memory_manager_test.cc:8
benchmark::State
Definition:
benchmark/include/benchmark/benchmark.h:503
state
Definition:
bloaty/third_party/zlib/contrib/blast/blast.c:41
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:35