Go to the documentation of this file.
13 {
"^Benchmark %s Time %s CPU %s Iterations UserCounters...$",
MR_Next},
30 {
"\"iterations\": %int,$",
MR_Next},
31 {
"\"real_time\": %int,$",
MR_Next},
32 {
"\"cpu_time\": %int,$",
MR_Next},
33 {
"\"time_unit\": \"ns\",$",
MR_Next},
41 double its = e.
GetAs<
double >(
"iterations");
52 namespace {
int num_calls1 = 0; }
57 state.
counters[
"bar"] = ++num_calls1;
63 {{
"^BM_Counters_WithBytesAndItemsPSec %console_report "
64 "bar=%hrfloat foo=%hrfloat +%hrfloatB/s +%hrfloat items/s$"}});
66 {
"\"iterations\": %int,$",
MR_Next},
67 {
"\"real_time\": %int,$",
MR_Next},
68 {
"\"cpu_time\": %int,$",
MR_Next},
69 {
"\"time_unit\": \"ns\",$",
MR_Next},
70 {
"\"bytes_per_second\": %int,$",
MR_Next},
71 {
"\"items_per_second\": %int,$",
MR_Next},
76 "%csv_bytes_items_report,%float,%float$"}});
98 state.
counters[
"foo"] = bm::Counter{1, bm::Counter::kIsRate};
99 state.
counters[
"bar"] = bm::Counter{2, bm::Counter::kIsRate};
104 {
"\"iterations\": %int,$",
MR_Next},
105 {
"\"real_time\": %int,$",
MR_Next},
106 {
"\"cpu_time\": %int,$",
MR_Next},
107 {
"\"time_unit\": \"ns\",$",
MR_Next},
108 {
"\"bar\": %float,$",
MR_Next},
133 ADD_CASES(
TC_ConsoleOut, {{
"^BM_Counters_Threads/threads:%int %console_report bar=%hrfloat foo=%hrfloat$"}});
135 {
"\"iterations\": %int,$",
MR_Next},
136 {
"\"real_time\": %int,$",
MR_Next},
137 {
"\"cpu_time\": %int,$",
MR_Next},
138 {
"\"time_unit\": \"ns\",$",
MR_Next},
139 {
"\"bar\": %float,$",
MR_Next},
142 ADD_CASES(
TC_CSVOut, {{
"^\"BM_Counters_Threads/threads:%int\",%csv_report,%float,%float$"}});
159 state.
counters[
"foo"] = bm::Counter{1, bm::Counter::kAvgThreads};
160 state.
counters[
"bar"] = bm::Counter{2, bm::Counter::kAvgThreads};
163 ADD_CASES(
TC_ConsoleOut, {{
"^BM_Counters_AvgThreads/threads:%int %console_report bar=%hrfloat foo=%hrfloat$"}});
165 {
"\"iterations\": %int,$",
MR_Next},
166 {
"\"real_time\": %int,$",
MR_Next},
167 {
"\"cpu_time\": %int,$",
MR_Next},
168 {
"\"time_unit\": \"ns\",$",
MR_Next},
169 {
"\"bar\": %float,$",
MR_Next},
172 ADD_CASES(
TC_CSVOut, {{
"^\"BM_Counters_AvgThreads/threads:%int\",%csv_report,%float,%float$"}});
190 state.
counters[
"foo"] = bm::Counter{1, bm::Counter::kAvgThreadsRate};
191 state.
counters[
"bar"] = bm::Counter{2, bm::Counter::kAvgThreadsRate};
194 ADD_CASES(
TC_ConsoleOut, {{
"^BM_Counters_AvgThreadsRate/threads:%int %console_report bar=%hrfloat/s foo=%hrfloat/s$"}});
196 {
"\"iterations\": %int,$",
MR_Next},
197 {
"\"real_time\": %int,$",
MR_Next},
198 {
"\"cpu_time\": %int,$",
MR_Next},
199 {
"\"time_unit\": \"ns\",$",
MR_Next},
200 {
"\"bar\": %float,$",
MR_Next},
203 ADD_CASES(
TC_CSVOut, {{
"^\"BM_Counters_AvgThreadsRate/threads:%int\",%csv_report,%float,%float$"}});
double DurationCPUTime() const
void BM_Counters_AvgThreads(benchmark::State &state)
void CheckThreads(Results const &e)
void BM_Counters_Simple(benchmark::State &state)
void BM_Counters_AvgThreadsRate(benchmark::State &state)
void BM_Counters_Rate(benchmark::State &state)
BENCHMARK(BM_Counters_Simple)
void CheckSimple(Results const &e)
CHECK_BENCHMARK_RESULTS("BM_Counters_Simple", &CheckSimple)
void CheckAvgThreads(Results const &e)
BENCHMARK_ALWAYS_INLINE size_t iterations() const
#define CHECK_COUNTER_VALUE(entry, var_type, var_name, relationship, value)
T GetAs(const char *entry_name) const
void RunOutputTests(int argc, char *argv[])
int main(int argc, char *argv[])
void CheckRate(Results const &e)
BENCHMARK_ALWAYS_INLINE void SetItemsProcessed(size_t items)
void CheckAvgThreadsRate(Results const &e)
void BM_Counters_Threads(benchmark::State &state)
void CheckBytesAndItemsPSec(Results const &e)
#define CHECK_FLOAT_RESULT_VALUE(entry, var_name, relationship, value, eps_factor)
void BM_Counters_WithBytesAndItemsPSec(benchmark::State &state)
ADD_CASES(TC_ConsoleOut, {{"^[-]+$", MR_Next}, {"^Benchmark %s Time %s CPU %s Iterations UserCounters...$", MR_Next}, {"^[-]+$", MR_Next}})
#define CHECK_FLOAT_COUNTER_VALUE(entry, var_name, relationship, value, eps_factor)
BENCHMARK_ALWAYS_INLINE void SetBytesProcessed(size_t bytes)
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:01