Public Member Functions | Private Member Functions | Private Attributes | List of all members
testing::Benchmark Class Reference

#include <benchmark.h>

Public Member Functions

BenchmarkArg (int x)
 
 Benchmark (const char *name, void(*fn)(int))
 
 Benchmark (const char *name, void(*fn_range)(int, int))
 
const char * Name ()
 
BenchmarkRange (int lo, int hi)
 
void Run ()
 
bool ShouldRun (int argc, char *argv[])
 

Private Member Functions

void Register (const char *name, void(*fn)(int), void(*fn_range)(int, int))
 
void RunRepeatedlyWithArg (int iterations, int arg)
 
void RunWithArg (int arg)
 

Private Attributes

std::vector< intargs_
 
void(* fn_ )(int)
 
void(* fn_range_ )(int, int)
 
const char * name_
 

Detailed Description

Definition at line 21 of file benchmark.h.

Constructor & Destructor Documentation

◆ Benchmark() [1/2]

testing::Benchmark::Benchmark ( const char *  name,
void(*)(int fn 
)
inline

Definition at line 23 of file benchmark.h.

◆ Benchmark() [2/2]

testing::Benchmark::Benchmark ( const char *  name,
void(*)(int, int fn_range 
)
inline

Definition at line 26 of file benchmark.h.

Member Function Documentation

◆ Arg()

Benchmark * testing::Benchmark::Arg ( int  x)

Definition at line 74 of file benchmark_main.cc.

◆ Name()

const char * testing::Benchmark::Name ( )

Definition at line 95 of file benchmark_main.cc.

◆ Range()

Benchmark * testing::Benchmark::Range ( int  lo,
int  hi 
)

Definition at line 79 of file benchmark_main.cc.

◆ Register()

void testing::Benchmark::Register ( const char *  name,
void(*)(int fn,
void(*)(int, int fn_range 
)
private

Definition at line 118 of file benchmark_main.cc.

◆ Run()

void testing::Benchmark::Run ( )

Definition at line 128 of file benchmark_main.cc.

◆ RunRepeatedlyWithArg()

void testing::Benchmark::RunRepeatedlyWithArg ( int  iterations,
int  arg 
)
private

Definition at line 141 of file benchmark_main.cc.

◆ RunWithArg()

void testing::Benchmark::RunWithArg ( int  arg)
private

Definition at line 154 of file benchmark_main.cc.

◆ ShouldRun()

bool testing::Benchmark::ShouldRun ( int  argc,
char *  argv[] 
)

Definition at line 98 of file benchmark_main.cc.

Member Data Documentation

◆ args_

std::vector<int> testing::Benchmark::args_
private

Definition at line 38 of file benchmark.h.

◆ fn_

void(* testing::Benchmark::fn_) (int)
private

Definition at line 36 of file benchmark.h.

◆ fn_range_

void(* testing::Benchmark::fn_range_) (int, int)
private

Definition at line 37 of file benchmark.h.

◆ name_

const char* testing::Benchmark::name_
private

Definition at line 35 of file benchmark.h.


The documentation for this class was generated from the following files:


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:47:31