Functions
user_counters_test.cc File Reference
#include "benchmark/benchmark.h"
#include "output_test.h"
Include dependency graph for user_counters_test.cc:

Go to the source code of this file.

Functions

 ADD_CASES (TC_ConsoleOut, {{"^[-]+$", MR_Next}, {"^Benchmark %s Time %s CPU %s Iterations UserCounters...$", MR_Next}, {"^[-]+$", MR_Next}})
 
 ADD_CASES (TC_ConsoleOut, {{"^BM_Counters_AvgThreads/threads:%int %console_report bar=%hrfloat foo=%hrfloat$"}})
 
 ADD_CASES (TC_ConsoleOut, {{"^BM_Counters_AvgThreadsRate/threads:%int %console_report bar=%hrfloat/s foo=%hrfloat/s$"}})
 
 ADD_CASES (TC_ConsoleOut, {{"^BM_Counters_Rate %console_report bar=%hrfloat/s foo=%hrfloat/s$"}})
 
 ADD_CASES (TC_ConsoleOut, {{"^BM_Counters_Simple %console_report bar=%hrfloat foo=%hrfloat$"}})
 
 ADD_CASES (TC_ConsoleOut, {{"^BM_Counters_Threads/threads:%int %console_report bar=%hrfloat foo=%hrfloat$"}})
 
 ADD_CASES (TC_ConsoleOut, {{"^BM_Counters_WithBytesAndItemsPSec %console_report " "bar=%hrfloat foo=%hrfloat +%hrfloatB/s +%hrfloat items/s$"}})
 
 ADD_CASES (TC_CSVOut, {{"%csv_header,\"bar\",\"foo\""}})
 
 ADD_CASES (TC_CSVOut, {{"^\"BM_Counters_AvgThreads/threads:%int\",%csv_report,%float,%float$"}})
 
 ADD_CASES (TC_CSVOut, {{"^\"BM_Counters_AvgThreadsRate/threads:%int\",%csv_report,%float,%float$"}})
 
 ADD_CASES (TC_CSVOut, {{"^\"BM_Counters_Rate\",%csv_report,%float,%float$"}})
 
 ADD_CASES (TC_CSVOut, {{"^\"BM_Counters_Simple\",%csv_report,%float,%float$"}})
 
 ADD_CASES (TC_CSVOut, {{"^\"BM_Counters_Threads/threads:%int\",%csv_report,%float,%float$"}})
 
 ADD_CASES (TC_CSVOut, {{"^\"BM_Counters_WithBytesAndItemsPSec\"," "%csv_bytes_items_report,%float,%float$"}})
 
 ADD_CASES (TC_JSONOut, {{"\"name\": \"BM_Counters_AvgThreads/threads:%int\",$"}, {"\"iterations\": %int,$", MR_Next}, {"\"real_time\": %int,$", MR_Next}, {"\"cpu_time\": %int,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"bar\": %float,$", MR_Next}, {"\"foo\": %float$", MR_Next}, {"}", MR_Next}})
 
 ADD_CASES (TC_JSONOut, {{"\"name\": \"BM_Counters_AvgThreadsRate/threads:%int\",$"}, {"\"iterations\": %int,$", MR_Next}, {"\"real_time\": %int,$", MR_Next}, {"\"cpu_time\": %int,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"bar\": %float,$", MR_Next}, {"\"foo\": %float$", MR_Next}, {"}", MR_Next}})
 
 ADD_CASES (TC_JSONOut, {{"\"name\": \"BM_Counters_Rate\",$"}, {"\"iterations\": %int,$", MR_Next}, {"\"real_time\": %int,$", MR_Next}, {"\"cpu_time\": %int,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"bar\": %float,$", MR_Next}, {"\"foo\": %float$", MR_Next}, {"}", MR_Next}})
 
 ADD_CASES (TC_JSONOut, {{"\"name\": \"BM_Counters_Simple\",$"}, {"\"iterations\": %int,$", MR_Next}, {"\"real_time\": %int,$", MR_Next}, {"\"cpu_time\": %int,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"bar\": %float,$", MR_Next}, {"\"foo\": %float$", MR_Next}, {"}", MR_Next}})
 
 ADD_CASES (TC_JSONOut, {{"\"name\": \"BM_Counters_Threads/threads:%int\",$"}, {"\"iterations\": %int,$", MR_Next}, {"\"real_time\": %int,$", MR_Next}, {"\"cpu_time\": %int,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"bar\": %float,$", MR_Next}, {"\"foo\": %float$", MR_Next}, {"}", MR_Next}})
 
 ADD_CASES (TC_JSONOut, {{"\"name\": \"BM_Counters_WithBytesAndItemsPSec\",$"}, {"\"iterations\": %int,$", MR_Next}, {"\"real_time\": %int,$", MR_Next}, {"\"cpu_time\": %int,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"bytes_per_second\": %int,$", MR_Next}, {"\"items_per_second\": %int,$", MR_Next}, {"\"bar\": %float,$", MR_Next}, {"\"foo\": %float$", MR_Next}, {"}", MR_Next}})
 
 BENCHMARK (BM_Counters_AvgThreads) -> ThreadRange(1, 8)
 
 BENCHMARK (BM_Counters_AvgThreadsRate) -> ThreadRange(1, 8)
 
 BENCHMARK (BM_Counters_Rate)
 
 BENCHMARK (BM_Counters_Simple)
 
 BENCHMARK (BM_Counters_Threads) -> ThreadRange(1, 8)
 
 BENCHMARK (BM_Counters_WithBytesAndItemsPSec)
 
void BM_Counters_AvgThreads (benchmark::State &state)
 
void BM_Counters_AvgThreadsRate (benchmark::State &state)
 
void BM_Counters_Rate (benchmark::State &state)
 
void BM_Counters_Simple (benchmark::State &state)
 
void BM_Counters_Threads (benchmark::State &state)
 
void BM_Counters_WithBytesAndItemsPSec (benchmark::State &state)
 
 CHECK_BENCHMARK_RESULTS ("BM_Counters_AvgThreads/threads:%int", &CheckAvgThreads)
 
 CHECK_BENCHMARK_RESULTS ("BM_Counters_AvgThreadsRate/threads:%int", &CheckAvgThreadsRate)
 
 CHECK_BENCHMARK_RESULTS ("BM_Counters_Rate", &CheckRate)
 
 CHECK_BENCHMARK_RESULTS ("BM_Counters_Simple", &CheckSimple)
 
 CHECK_BENCHMARK_RESULTS ("BM_Counters_Threads/threads:%int", &CheckThreads)
 
 CHECK_BENCHMARK_RESULTS ("BM_Counters_WithBytesAndItemsPSec", &CheckBytesAndItemsPSec)
 
void CheckAvgThreads (Results const &e)
 
void CheckAvgThreadsRate (Results const &e)
 
void CheckBytesAndItemsPSec (Results const &e)
 
void CheckRate (Results const &e)
 
void CheckSimple (Results const &e)
 
void CheckThreads (Results const &e)
 
int main (int argc, char *argv[])
 

Function Documentation

◆ ADD_CASES() [1/20]

ADD_CASES ( TC_ConsoleOut  ,
{{"^[-]+$", MR_Next}, {"^Benchmark %s Time %s CPU %s Iterations UserCounters...$", MR_Next}, {"^[-]+$", MR_Next}}   
)

◆ ADD_CASES() [2/20]

ADD_CASES ( TC_ConsoleOut  ,
{{"^BM_Counters_AvgThreads/threads:%int %console_report bar=%hrfloat foo=%hrfloat$"}}   
)

◆ ADD_CASES() [3/20]

ADD_CASES ( TC_ConsoleOut  ,
{{"^BM_Counters_AvgThreadsRate/threads:%int %console_report bar=%hrfloat/s foo=%hrfloat/s$"}}   
)

◆ ADD_CASES() [4/20]

ADD_CASES ( TC_ConsoleOut  ,
{{"^BM_Counters_Rate %console_report bar=%hrfloat/s foo=%hrfloat/s$"}}   
)

◆ ADD_CASES() [5/20]

ADD_CASES ( TC_ConsoleOut  ,
{{"^BM_Counters_Simple %console_report bar=%hrfloat foo=%hrfloat$"}}   
)

◆ ADD_CASES() [6/20]

ADD_CASES ( TC_ConsoleOut  ,
{{"^BM_Counters_Threads/threads:%int %console_report bar=%hrfloat foo=%hrfloat$"}}   
)

◆ ADD_CASES() [7/20]

ADD_CASES ( TC_ConsoleOut  ,
{{"^BM_Counters_WithBytesAndItemsPSec %console_report " "bar=%hrfloat foo=%hrfloat +%hrfloatB/s +%hrfloat items/s$"}}   
)

◆ ADD_CASES() [8/20]

ADD_CASES ( TC_CSVOut  ,
{{"%csv_header,\"bar\",\"foo\""}}   
)

◆ ADD_CASES() [9/20]

ADD_CASES ( TC_CSVOut  ,
{{"^\"BM_Counters_AvgThreads/threads:%int\",%csv_report,%float,%float$"}}   
)

◆ ADD_CASES() [10/20]

ADD_CASES ( TC_CSVOut  ,
{{"^\"BM_Counters_AvgThreadsRate/threads:%int\",%csv_report,%float,%float$"}}   
)

◆ ADD_CASES() [11/20]

ADD_CASES ( TC_CSVOut  ,
{{"^\"BM_Counters_Rate\",%csv_report,%float,%float$"}}   
)

◆ ADD_CASES() [12/20]

ADD_CASES ( TC_CSVOut  ,
{{"^\"BM_Counters_Simple\",%csv_report,%float,%float$"}}   
)

◆ ADD_CASES() [13/20]

ADD_CASES ( TC_CSVOut  ,
{{"^\"BM_Counters_Threads/threads:%int\",%csv_report,%float,%float$"}}   
)

◆ ADD_CASES() [14/20]

ADD_CASES ( TC_CSVOut  ,
{{"^\"BM_Counters_WithBytesAndItemsPSec\"," "%csv_bytes_items_report,%float,%float$"}}   
)

◆ ADD_CASES() [15/20]

ADD_CASES ( TC_JSONOut  ,
{{"\"name\": \"BM_Counters_AvgThreads/threads:%int\",$"}, {"\"iterations\": %int,$", MR_Next}, {"\"real_time\": %int,$", MR_Next}, {"\"cpu_time\": %int,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"bar\": %float,$", MR_Next}, {"\"foo\": %float$", MR_Next}, {"}", MR_Next}}   
)

◆ ADD_CASES() [16/20]

ADD_CASES ( TC_JSONOut  ,
{{"\"name\": \"BM_Counters_AvgThreadsRate/threads:%int\",$"}, {"\"iterations\": %int,$", MR_Next}, {"\"real_time\": %int,$", MR_Next}, {"\"cpu_time\": %int,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"bar\": %float,$", MR_Next}, {"\"foo\": %float$", MR_Next}, {"}", MR_Next}}   
)

◆ ADD_CASES() [17/20]

ADD_CASES ( TC_JSONOut  ,
{{"\"name\": \"BM_Counters_Rate\",$"}, {"\"iterations\": %int,$", MR_Next}, {"\"real_time\": %int,$", MR_Next}, {"\"cpu_time\": %int,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"bar\": %float,$", MR_Next}, {"\"foo\": %float$", MR_Next}, {"}", MR_Next}}   
)

◆ ADD_CASES() [18/20]

ADD_CASES ( TC_JSONOut  ,
{{"\"name\": \"BM_Counters_Simple\",$"}, {"\"iterations\": %int,$", MR_Next}, {"\"real_time\": %int,$", MR_Next}, {"\"cpu_time\": %int,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"bar\": %float,$", MR_Next}, {"\"foo\": %float$", MR_Next}, {"}", MR_Next}}   
)

◆ ADD_CASES() [19/20]

ADD_CASES ( TC_JSONOut  ,
{{"\"name\": \"BM_Counters_Threads/threads:%int\",$"}, {"\"iterations\": %int,$", MR_Next}, {"\"real_time\": %int,$", MR_Next}, {"\"cpu_time\": %int,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"bar\": %float,$", MR_Next}, {"\"foo\": %float$", MR_Next}, {"}", MR_Next}}   
)

◆ ADD_CASES() [20/20]

ADD_CASES ( TC_JSONOut  ,
{{"\"name\": \"BM_Counters_WithBytesAndItemsPSec\",$"}, {"\"iterations\": %int,$", MR_Next}, {"\"real_time\": %int,$", MR_Next}, {"\"cpu_time\": %int,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"bytes_per_second\": %int,$", MR_Next}, {"\"items_per_second\": %int,$", MR_Next}, {"\"bar\": %float,$", MR_Next}, {"\"foo\": %float$", MR_Next}, {"}", MR_Next}}   
)

◆ BENCHMARK() [1/6]

BENCHMARK ( BM_Counters_AvgThreads  ) -> ThreadRange(1, 8)

◆ BENCHMARK() [2/6]

BENCHMARK ( BM_Counters_AvgThreadsRate  ) -> ThreadRange(1, 8)

◆ BENCHMARK() [3/6]

BENCHMARK ( BM_Counters_Rate  )

◆ BENCHMARK() [4/6]

BENCHMARK ( BM_Counters_Simple  )

◆ BENCHMARK() [5/6]

BENCHMARK ( BM_Counters_Threads  ) -> ThreadRange(1, 8)

◆ BENCHMARK() [6/6]

◆ BM_Counters_AvgThreads()

void BM_Counters_AvgThreads ( benchmark::State state)

Definition at line 155 of file user_counters_test.cc.

◆ BM_Counters_AvgThreadsRate()

void BM_Counters_AvgThreadsRate ( benchmark::State state)

Definition at line 186 of file user_counters_test.cc.

◆ BM_Counters_Rate()

void BM_Counters_Rate ( benchmark::State state)

Definition at line 94 of file user_counters_test.cc.

◆ BM_Counters_Simple()

void BM_Counters_Simple ( benchmark::State state)

Definition at line 21 of file user_counters_test.cc.

◆ BM_Counters_Threads()

void BM_Counters_Threads ( benchmark::State state)

Definition at line 126 of file user_counters_test.cc.

◆ BM_Counters_WithBytesAndItemsPSec()

void BM_Counters_WithBytesAndItemsPSec ( benchmark::State state)

Definition at line 53 of file user_counters_test.cc.

◆ CHECK_BENCHMARK_RESULTS() [1/6]

CHECK_BENCHMARK_RESULTS ( "BM_Counters_AvgThreads/threads:%int"  ,
CheckAvgThreads 
)

◆ CHECK_BENCHMARK_RESULTS() [2/6]

CHECK_BENCHMARK_RESULTS ( "BM_Counters_AvgThreadsRate/threads:%int"  ,
CheckAvgThreadsRate 
)

◆ CHECK_BENCHMARK_RESULTS() [3/6]

CHECK_BENCHMARK_RESULTS ( "BM_Counters_Rate"  ,
CheckRate 
)

◆ CHECK_BENCHMARK_RESULTS() [4/6]

CHECK_BENCHMARK_RESULTS ( "BM_Counters_Simple"  ,
CheckSimple 
)

◆ CHECK_BENCHMARK_RESULTS() [5/6]

CHECK_BENCHMARK_RESULTS ( "BM_Counters_Threads/threads:%int"  ,
CheckThreads 
)

◆ CHECK_BENCHMARK_RESULTS() [6/6]

CHECK_BENCHMARK_RESULTS ( "BM_Counters_WithBytesAndItemsPSec"  ,
CheckBytesAndItemsPSec 
)

◆ CheckAvgThreads()

void CheckAvgThreads ( Results const &  e)

Definition at line 175 of file user_counters_test.cc.

◆ CheckAvgThreadsRate()

void CheckAvgThreadsRate ( Results const &  e)

Definition at line 206 of file user_counters_test.cc.

◆ CheckBytesAndItemsPSec()

void CheckBytesAndItemsPSec ( Results const &  e)

Definition at line 79 of file user_counters_test.cc.

◆ CheckRate()

void CheckRate ( Results const &  e)

Definition at line 114 of file user_counters_test.cc.

◆ CheckSimple()

void CheckSimple ( Results const &  e)

Definition at line 40 of file user_counters_test.cc.

◆ CheckThreads()

void CheckThreads ( Results const &  e)

Definition at line 145 of file user_counters_test.cc.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 217 of file user_counters_test.cc.



libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:05