Classes | Macros | Typedefs | Functions | Variables
register_benchmark_test.cc File Reference
#include <cassert>
#include <vector>
#include "../src/check.h"
#include "benchmark/benchmark.h"
Include dependency graph for register_benchmark_test.cc:

Go to the source code of this file.

Classes

struct  CustomFixture
 

Macros

#define ADD_CASES(...)   int CONCAT(dummy, __LINE__) = AddCases({__VA_ARGS__})
 
#define CONCAT(x, y)   CONCAT2(x, y)
 
#define CONCAT2(x, y)   x##y
 

Typedefs

typedef benchmark::internal::BenchmarkReturnVal
 

Functions

 ADD_CASES ({"BM_function"}, {"BM_function_manual_registration"})
 
 ADD_CASES ({"test1", "One"}, {"test2", "Two"}, {"test3", "Three"})
 
 BENCHMARK (BM_function)
 
void BM_extra_args (benchmark::State &st, const char *label)
 
void BM_function (benchmark::State &state)
 
int main (int argc, char *argv[])
 
int RegisterFromFunction ()
 
void RunTestOne ()
 
void RunTestTwo ()
 
void TestRegistrationAtRuntime ()
 

Variables

ReturnVal dummy
 
int dummy2 = RegisterFromFunction()
 

Macro Definition Documentation

◆ ADD_CASES

#define ADD_CASES (   ...)    int CONCAT(dummy, __LINE__) = AddCases({__VA_ARGS__})

Definition at line 54 of file register_benchmark_test.cc.

◆ CONCAT

#define CONCAT (   x,
  y 
)    CONCAT2(x, y)

Definition at line 52 of file register_benchmark_test.cc.

◆ CONCAT2

#define CONCAT2 (   x,
  y 
)    x##y

Definition at line 53 of file register_benchmark_test.cc.

Typedef Documentation

◆ ReturnVal

Definition at line 58 of file register_benchmark_test.cc.

Function Documentation

◆ ADD_CASES() [1/2]

ADD_CASES ( {"BM_function"}  ,
{"BM_function_manual_registration"}   
)

◆ ADD_CASES() [2/2]

ADD_CASES ( {"test1", "One"}  ,
{"test2", "Two"}  ,
{"test3", "Three"}   
)

◆ BENCHMARK()

BENCHMARK ( BM_function  )

◆ BM_extra_args()

void BM_extra_args ( benchmark::State st,
const char *  label 
)

Definition at line 79 of file register_benchmark_test.cc.

◆ BM_function()

void BM_function ( benchmark::State state)

Definition at line 63 of file register_benchmark_test.cc.

◆ main()

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

Definition at line 177 of file register_benchmark_test.cc.

◆ RegisterFromFunction()

int RegisterFromFunction ( )

Definition at line 84 of file register_benchmark_test.cc.

◆ RunTestOne()

void RunTestOne ( )

Definition at line 131 of file register_benchmark_test.cc.

◆ RunTestTwo()

void RunTestTwo ( )

Definition at line 151 of file register_benchmark_test.cc.

◆ TestRegistrationAtRuntime()

void TestRegistrationAtRuntime ( )

Definition at line 107 of file register_benchmark_test.cc.

Variable Documentation

◆ dummy

ReturnVal dummy
Initial value:
"BM_function_manual_registration", BM_function)

Definition at line 68 of file register_benchmark_test.cc.

◆ dummy2

int dummy2 = RegisterFromFunction()

Definition at line 91 of file register_benchmark_test.cc.

benchmark::RegisterBenchmark
internal::Benchmark * RegisterBenchmark(const char *name, internal::Function *fn)
Definition: benchmark.h:821
BM_function
void BM_function(benchmark::State &state)
Definition: register_benchmark_test.cc:63


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