Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
benchmark Namespace Reference

Namespaces

 cycleclock
 
 internal
 

Classes

class  Barrier
 
class  BenchmarkReporter
 
struct  ChooseClockType
 
class  ConsoleReporter
 
class  Counter
 
class  CSVReporter
 
class  Fixture
 
class  JSONReporter
 
struct  LeastSq
 
class  MutexLock
 
class  Regex
 
class  Stat1
 
class  Stat1MinMax
 
class  State
 
class  Vector2
 
class  Vector3
 
class  Vector4
 

Typedefs

typedef double() BigOFunc(int)
 
typedef std::condition_variable Condition
 
typedef Stat1< double, int64_t > Stat1_d
 
typedef Stat1< float, int64_t > Stat1_f
 
typedef Stat1MinMax< double, int64_t > Stat1MinMax_d
 
typedef Stat1MinMax< float, int64_t > Stat1MinMax_f
 
typedef std::map< std::string, CounterUserCounters
 

Enumerations

enum  BigO {
  oNone, o1, oN, oNSquared,
  oNCubed, oLogN, oNLogN, oAuto,
  oLambda
}
 
enum  LogColor {
  COLOR_DEFAULT, COLOR_RED, COLOR_GREEN, COLOR_YELLOW,
  COLOR_BLUE, COLOR_MAGENTA, COLOR_CYAN, COLOR_WHITE
}
 
enum  TimeUnit { kNanosecond, kMicrosecond, kMillisecond }
 

Functions

void AppendHumanReadable (int n, std::string *str)
 
bool BoolFromEnv (const char *flag, bool default_value)
 
class CAPABILITY ("mutex") Mutex
 
double ChildrenCPUUsage ()
 
double ChronoClockNow ()
 
void ClearRegisteredBenchmarks ()
 
void ColorPrintf (std::ostream &out, LogColor color, const char *fmt, va_list args)
 
void ColorPrintf (std::ostream &out, LogColor color, const char *fmt,...)
 
std::vector< BenchmarkReporter::RunComputeBigO (const std::vector< BenchmarkReporter::Run > &reports)
 
std::vector< BenchmarkReporter::RunComputeStats (const std::vector< BenchmarkReporter::Run > &reports)
 
bool CpuScalingEnabled ()
 
double CyclesPerSecond (void)
 
template<class Tp >
BENCHMARK_ALWAYS_INLINE void DoNotOptimize (Tp const &value)
 
double DoubleFromEnv (const char *flag, double default_val)
 
std::string ExponentToPrefix (int64_t exponent, bool iec)
 
BigOFuncFittingCurve (BigO complexity)
 
static std::string FlagToEnvVar (const char *flag)
 
std::string FormatString (const char *msg, va_list args)
 
std::string FormatString (const char *msg,...)
 
std::string GetBigOString (BigO complexity)
 
double GetTimeUnitMultiplier (TimeUnit unit)
 
const char * GetTimeUnitString (TimeUnit unit)
 
std::string HumanReadableNumber (double n)
 
static void IgnoreColorPrint (std::ostream &out, LogColor, const char *fmt,...)
 
void Initialize (int *argc, char **argv)
 
int32_t Int32FromEnv (const char *flag, int32_t default_value)
 
bool IsColorTerminal ()
 
bool IsFlag (const char *str, const char *flag)
 
bool IsTruthyFlagValue (const std::string &value)
 
std::string LocalDateTimeString ()
 
LeastSq MinimalLeastSq (const std::vector< int > &n, const std::vector< double > &time, BigOFunc *fitting_curve)
 
LeastSq MinimalLeastSq (const std::vector< int > &n, const std::vector< double > &time, const BigO complexity)
 
int NumCPUs (void)
 
template<typename VType , typename NumType >
std::ostream & operator<< (std::ostream &out, const Stat1< VType, NumType > &s)
 
template<typename VType , typename NumType >
std::ostream & operator<< (std::ostream &out, const Stat1MinMax< VType, NumType > &s)
 
bool ParseBoolFlag (const char *str, const char *flag, bool *value)
 
bool ParseDouble (const std::string &src_text, const char *str, double *value)
 
bool ParseDoubleFlag (const char *str, const char *flag, double *value)
 
const char * ParseFlagValue (const char *str, const char *flag, bool def_optional)
 
bool ParseInt32 (const std::string &src_text, const char *str, int32_t *value)
 
bool ParseInt32Flag (const char *str, const char *flag, int32_t *value)
 
bool ParseStringFlag (const char *str, const char *flag, std::string *value)
 
double ProcessCPUUsage ()
 
internal::BenchmarkRegisterBenchmark (const char *name, internal::Function *fn)
 
void ReplaceAll (std::string *str, const std::string &from, const std::string &to)
 
bool ReportUnrecognizedArguments (int argc, char **argv)
 
size_t RunSpecifiedBenchmarks ()
 
size_t RunSpecifiedBenchmarks (BenchmarkReporter *console_reporter)
 
size_t RunSpecifiedBenchmarks (BenchmarkReporter *console_reporter, BenchmarkReporter *file_reporter)
 
void SleepForMicroseconds (int microseconds)
 
void SleepForMilliseconds (int milliseconds)
 
void SleepForSeconds (double seconds)
 
template<class... Args>
std::string StrCat (Args &&... args)
 
std::ostream & StringCatImp (std::ostream &out) BENCHMARK_NOEXCEPT
 
template<class First , class... Rest>
std::ostream & StringCatImp (std::ostream &out, First &&f, Rest &&... rest)
 
const char * StringFromEnv (const char *flag, const char *default_value)
 
std::string StringPrintF (const char *format,...)
 
std::string StringPrintFImp (const char *msg, va_list args)
 
double ThreadCPUUsage ()
 
std::string ToBinaryStringFullySpecified (double value, double threshold, int precision)
 
void ToExponentAndMantissa (double val, double thresh, int precision, double one_k, std::string *mantissa, int64_t *exponent)
 

Variables

const int kNumMicrosPerMilli = 1000
 
const int kNumMicrosPerSecond = kNumMillisPerSecond * 1000
 
const int kNumMillisPerSecond = 1000
 
const int kNumNanosPerMicro = 1000
 
const int kNumNanosPerSecond = kNumNanosPerMicro * kNumMicrosPerSecond
 

Typedef Documentation

◆ BigOFunc

typedef double() benchmark::BigOFunc(int)

Definition at line 379 of file benchmark.h.

◆ Condition

typedef std::condition_variable benchmark::Condition

Definition at line 69 of file protobuf/third_party/benchmark/src/mutex.h.

◆ Stat1_d

typedef Stat1<double, int64_t> benchmark::Stat1_d

Definition at line 18 of file stat.h.

◆ Stat1_f

typedef Stat1<float, int64_t> benchmark::Stat1_f

Definition at line 15 of file stat.h.

◆ Stat1MinMax_d

typedef Stat1MinMax<double, int64_t> benchmark::Stat1MinMax_d

Definition at line 20 of file stat.h.

◆ Stat1MinMax_f

typedef Stat1MinMax<float, int64_t> benchmark::Stat1MinMax_f

Definition at line 19 of file stat.h.

◆ UserCounters

Definition at line 364 of file benchmark.h.

Enumeration Type Documentation

◆ BigO

Enumerator
oNone 
o1 
oN 
oNSquared 
oNCubed 
oLogN 
oNLogN 
oAuto 
oLambda 

Definition at line 375 of file benchmark.h.

◆ LogColor

Enumerator
COLOR_DEFAULT 
COLOR_RED 
COLOR_GREEN 
COLOR_YELLOW 
COLOR_BLUE 
COLOR_MAGENTA 
COLOR_CYAN 
COLOR_WHITE 

Definition at line 9 of file colorprint.h.

◆ TimeUnit

Enumerator
kNanosecond 
kMicrosecond 
kMillisecond 

Definition at line 369 of file benchmark.h.

Function Documentation

◆ AppendHumanReadable()

void benchmark::AppendHumanReadable ( int  n,
std::string str 
)

Definition at line 111 of file string_util.cc.

◆ BoolFromEnv()

bool benchmark::BoolFromEnv ( const char *  flag,
bool  default_value 
)

Definition at line 95 of file commandlineflags.cc.

◆ CAPABILITY()

class benchmark::CAPABILITY ( "mutex"  )

Definition at line 75 of file protobuf/third_party/benchmark/src/mutex.h.

◆ ChildrenCPUUsage()

double benchmark::ChildrenCPUUsage ( )

◆ ChronoClockNow()

double benchmark::ChronoClockNow ( )
inline

Definition at line 38 of file timers.h.

◆ ClearRegisteredBenchmarks()

void benchmark::ClearRegisteredBenchmarks ( )

Definition at line 463 of file benchmark_register.cc.

◆ ColorPrintf() [1/2]

void benchmark::ColorPrintf ( std::ostream &  out,
LogColor  color,
const char *  fmt,
va_list  args 
)

Definition at line 128 of file colorprint.cc.

◆ ColorPrintf() [2/2]

void benchmark::ColorPrintf ( std::ostream &  out,
LogColor  color,
const char *  fmt,
  ... 
)

Definition at line 121 of file colorprint.cc.

◆ ComputeBigO()

std::vector< BenchmarkReporter::Run > benchmark::ComputeBigO ( const std::vector< BenchmarkReporter::Run > &  reports)

Definition at line 256 of file complexity.cc.

◆ ComputeStats()

std::vector< BenchmarkReporter::Run > benchmark::ComputeStats ( const std::vector< BenchmarkReporter::Run > &  reports)

Definition at line 153 of file complexity.cc.

◆ CpuScalingEnabled()

bool benchmark::CpuScalingEnabled ( )

Definition at line 336 of file sysinfo.cc.

◆ CyclesPerSecond()

double benchmark::CyclesPerSecond ( void  )

Definition at line 316 of file sysinfo.cc.

◆ DoNotOptimize()

template<class Tp >
BENCHMARK_ALWAYS_INLINE void benchmark::DoNotOptimize ( Tp const &  value)
inline

Definition at line 328 of file benchmark.h.

◆ DoubleFromEnv()

double benchmark::DoubleFromEnv ( const char *  flag,
double  default_val 
)

◆ ExponentToPrefix()

std::string benchmark::ExponentToPrefix ( int64_t  exponent,
bool  iec 
)

Definition at line 88 of file string_util.cc.

◆ FittingCurve()

BigOFunc* benchmark::FittingCurve ( BigO  complexity)

Definition at line 29 of file complexity.cc.

◆ FlagToEnvVar()

static std::string benchmark::FlagToEnvVar ( const char *  flag)
static

Definition at line 81 of file commandlineflags.cc.

◆ FormatString() [1/2]

std::string benchmark::FormatString ( const char *  msg,
va_list  args 
)

Definition at line 85 of file colorprint.cc.

◆ FormatString() [2/2]

std::string benchmark::FormatString ( const char *  msg,
  ... 
)

Definition at line 113 of file colorprint.cc.

◆ GetBigOString()

std::string benchmark::GetBigOString ( BigO  complexity)

Definition at line 48 of file complexity.cc.

◆ GetTimeUnitMultiplier()

double benchmark::GetTimeUnitMultiplier ( TimeUnit  unit)
inline

Definition at line 1196 of file benchmark.h.

◆ GetTimeUnitString()

const char* benchmark::GetTimeUnitString ( TimeUnit  unit)
inline

Definition at line 1184 of file benchmark.h.

◆ HumanReadableNumber()

std::string benchmark::HumanReadableNumber ( double  n)

Definition at line 118 of file string_util.cc.

◆ IgnoreColorPrint()

static void benchmark::IgnoreColorPrint ( std::ostream &  out,
LogColor  ,
const char *  fmt,
  ... 
)
static

Definition at line 93 of file console_reporter.cc.

◆ Initialize()

void benchmark::Initialize ( int *  argc,
char **  argv 
)

Definition at line 703 of file benchmark.cc.

◆ Int32FromEnv()

int32_t benchmark::Int32FromEnv ( const char *  flag,
int32_t  default_value 
)

Definition at line 105 of file commandlineflags.cc.

◆ IsColorTerminal()

bool benchmark::IsColorTerminal ( )

Definition at line 158 of file colorprint.cc.

◆ IsFlag()

bool benchmark::IsFlag ( const char *  str,
const char *  flag 
)

Definition at line 208 of file commandlineflags.cc.

◆ IsTruthyFlagValue()

bool benchmark::IsTruthyFlagValue ( const std::string value)

Definition at line 212 of file commandlineflags.cc.

◆ LocalDateTimeString()

std::string benchmark::LocalDateTimeString ( )

Definition at line 210 of file timers.cc.

◆ MinimalLeastSq() [1/2]

LeastSq benchmark::MinimalLeastSq ( const std::vector< int > &  n,
const std::vector< double > &  time,
BigOFunc fitting_curve 
)

Definition at line 77 of file complexity.cc.

◆ MinimalLeastSq() [2/2]

LeastSq benchmark::MinimalLeastSq ( const std::vector< int > &  n,
const std::vector< double > &  time,
const BigO  complexity 
)

Definition at line 121 of file complexity.cc.

◆ NumCPUs()

int benchmark::NumCPUs ( void  )

Definition at line 321 of file sysinfo.cc.

◆ operator<<() [1/2]

template<typename VType , typename NumType >
std::ostream& benchmark::operator<< ( std::ostream &  out,
const Stat1< VType, NumType > &  s 
)

Definition at line 203 of file stat.h.

◆ operator<<() [2/2]

template<typename VType , typename NumType >
std::ostream& benchmark::operator<< ( std::ostream &  out,
const Stat1MinMax< VType, NumType > &  s 
)

Definition at line 301 of file stat.h.

◆ ParseBoolFlag()

bool benchmark::ParseBoolFlag ( const char *  str,
const char *  flag,
bool *  value 
)

Definition at line 161 of file commandlineflags.cc.

◆ ParseDouble()

bool benchmark::ParseDouble ( const std::string src_text,
const char *  str,
double *  value 
)

Definition at line 61 of file commandlineflags.cc.

◆ ParseDoubleFlag()

bool benchmark::ParseDoubleFlag ( const char *  str,
const char *  flag,
double *  value 
)

Definition at line 185 of file commandlineflags.cc.

◆ ParseFlagValue()

const char* benchmark::ParseFlagValue ( const char *  str,
const char *  flag,
bool  def_optional 
)

Definition at line 136 of file commandlineflags.cc.

◆ ParseInt32()

bool benchmark::ParseInt32 ( const std::string src_text,
const char *  str,
int32_t *  value 
)

Definition at line 27 of file commandlineflags.cc.

◆ ParseInt32Flag()

bool benchmark::ParseInt32Flag ( const char *  str,
const char *  flag,
int32_t *  value 
)

Definition at line 173 of file commandlineflags.cc.

◆ ParseStringFlag()

bool benchmark::ParseStringFlag ( const char *  str,
const char *  flag,
std::string value 
)

Definition at line 197 of file commandlineflags.cc.

◆ ProcessCPUUsage()

double benchmark::ProcessCPUUsage ( )

Definition at line 106 of file timers.cc.

◆ RegisterBenchmark()

internal::Benchmark * benchmark::RegisterBenchmark ( const char *  name,
internal::Function fn 
)
inline

Definition at line 821 of file benchmark.h.

◆ ReplaceAll()

void benchmark::ReplaceAll ( std::string str,
const std::string from,
const std::string to 
)

Definition at line 163 of file string_util.cc.

◆ ReportUnrecognizedArguments()

bool benchmark::ReportUnrecognizedArguments ( int  argc,
char **  argv 
)

Definition at line 708 of file benchmark.cc.

◆ RunSpecifiedBenchmarks() [1/3]

size_t benchmark::RunSpecifiedBenchmarks ( )

Definition at line 571 of file benchmark.cc.

◆ RunSpecifiedBenchmarks() [2/3]

size_t benchmark::RunSpecifiedBenchmarks ( BenchmarkReporter console_reporter)

Definition at line 575 of file benchmark.cc.

◆ RunSpecifiedBenchmarks() [3/3]

size_t benchmark::RunSpecifiedBenchmarks ( BenchmarkReporter console_reporter,
BenchmarkReporter file_reporter 
)

Definition at line 579 of file benchmark.cc.

◆ SleepForMicroseconds()

void benchmark::SleepForMicroseconds ( int  microseconds)

Definition at line 35 of file sleep.cc.

◆ SleepForMilliseconds()

void benchmark::SleepForMilliseconds ( int  milliseconds)

Definition at line 43 of file sleep.cc.

◆ SleepForSeconds()

void benchmark::SleepForSeconds ( double  seconds)

Definition at line 47 of file sleep.cc.

◆ StrCat()

template<class... Args>
std::string benchmark::StrCat ( Args &&...  args)
inline

Definition at line 29 of file string_util.h.

◆ StringCatImp() [1/2]

std::ostream& benchmark::StringCatImp ( std::ostream &  out)
inline

Definition at line 17 of file string_util.h.

◆ StringCatImp() [2/2]

template<class First , class... Rest>
std::ostream& benchmark::StringCatImp ( std::ostream &  out,
First &&  f,
Rest &&...  rest 
)
inline

Definition at line 22 of file string_util.h.

◆ StringFromEnv()

const char * benchmark::StringFromEnv ( const char *  flag,
const char *  default_value 
)

Definition at line 125 of file commandlineflags.cc.

◆ StringPrintF()

std::string benchmark::StringPrintF ( const char *  format,
  ... 
)

Definition at line 155 of file string_util.cc.

◆ StringPrintFImp()

std::string benchmark::StringPrintFImp ( const char *  msg,
va_list  args 
)

Definition at line 125 of file string_util.cc.

◆ ThreadCPUUsage()

double benchmark::ThreadCPUUsage ( )

Definition at line 137 of file timers.cc.

◆ ToBinaryStringFullySpecified()

std::string benchmark::ToBinaryStringFullySpecified ( double  value,
double  threshold,
int  precision 
)

Definition at line 102 of file string_util.cc.

◆ ToExponentAndMantissa()

void benchmark::ToExponentAndMantissa ( double  val,
double  thresh,
int  precision,
double  one_k,
std::string mantissa,
int64_t *  exponent 
)

Definition at line 32 of file string_util.cc.

Variable Documentation

◆ kNumMicrosPerMilli

const int benchmark::kNumMicrosPerMilli = 1000

Definition at line 6 of file sleep.h.

◆ kNumMicrosPerSecond

const int benchmark::kNumMicrosPerSecond = kNumMillisPerSecond * 1000

Definition at line 7 of file sleep.h.

◆ kNumMillisPerSecond

const int benchmark::kNumMillisPerSecond = 1000

Definition at line 5 of file sleep.h.

◆ kNumNanosPerMicro

const int benchmark::kNumNanosPerMicro = 1000

Definition at line 8 of file sleep.h.

◆ kNumNanosPerSecond

const int benchmark::kNumNanosPerSecond = kNumNanosPerMicro * kNumMicrosPerSecond

Definition at line 9 of file sleep.h.



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