cpp-stat-bench 0.24.0
Benchmark library with statistics for C++.
Loading...
Searching...
No Matches
stat_bench Namespace Reference

Namespace of stat_bench source codes. More...

Namespaces

namespace  bench_impl
 Namespace of internal implementation.
 
namespace  clock
 Namespace of clocks for benchmarks.
 
namespace  filters
 Namespace of filters of benchmarks.
 
namespace  impl
 Namespace of internal implementation.
 
namespace  measurer
 Namespace of classes to measure time in benchmarks.
 
namespace  param
 Namespace of parameters of benchmarks.
 
namespace  plots
 Namespace of plotting.
 
namespace  reporter
 Namespace of reporters of results of benchmarks.
 
namespace  runner
 Namespace of classes to run benchmarks.
 
namespace  stat
 Namespace of statistics.
 
namespace  util
 Namespace of utility functions and classes.
 

Classes

class  BenchmarkCaseName
 Class of names of cases of benchmarks. More...
 
class  BenchmarkCondition
 Class of conditions of benchmarks. More...
 
class  BenchmarkFullName
 Class of information of cases in benchmarks. More...
 
class  BenchmarkGroupName
 Class of names of groups of benchmarks. More...
 
class  CustomOutputName
 Class of names of custom outputs. More...
 
class  FixtureBase
 Base class of fixtures. More...
 
class  InvocationContext
 Class of context of invocations of benchmarks. More...
 
class  PlotOption
 Enumeration of options for plots. More...
 
class  PlotOptions
 Class of options for plots. More...
 
class  StatBenchException
 Class of exceptions in this library. More...
 

Functions

auto current_invocation_context () -> InvocationContext &
 Get the current invocation context.
 
template<typename T>
void do_not_optimize (T &&val) noexcept
 Prevent compilers to optimize away a value.
 
void memory_barrier () noexcept
 Prevent optimizers to move memory access beyond this function call.
 
auto operator!= (const BenchmarkCaseName &lhs, const BenchmarkCaseName &rhs) noexcept -> bool
 Compare two BenchmarkCaseName objects.
 
auto operator!= (const BenchmarkGroupName &lhs, const BenchmarkGroupName &rhs) noexcept -> bool
 Compare two BenchmarkGroupName objects.
 
auto operator!= (const CustomOutputName &lhs, const CustomOutputName &rhs) noexcept -> bool
 Compare two CustomOutputName objects.
 
auto operator<< (std::ostream &stream, const BenchmarkCaseName &val) -> std::ostream &
 Format to a stream.
 
auto operator<< (std::ostream &stream, const BenchmarkGroupName &val) -> std::ostream &
 Format to a stream.
 
auto operator<< (std::ostream &stream, const CustomOutputName &val) -> std::ostream &
 Format to a stream.
 
auto operator== (const BenchmarkCaseName &lhs, const BenchmarkCaseName &rhs) noexcept -> bool
 Compare two BenchmarkCaseName objects.
 
auto operator== (const BenchmarkGroupName &lhs, const BenchmarkGroupName &rhs) noexcept -> bool
 Compare two BenchmarkGroupName objects.
 
auto operator== (const CustomOutputName &lhs, const CustomOutputName &rhs) noexcept -> bool
 Compare two CustomOutputName objects.
 

Detailed Description

Namespace of stat_bench source codes.

Function Documentation

◆ current_invocation_context()

auto stat_bench::current_invocation_context ( ) -> InvocationContext&
inlinenodiscard

Get the current invocation context.

Returns
Reference to the current invocation context.
Examples
configure_plotting.cpp, custom_output_with_stat.cpp, custom_output_without_stat.cpp, and parameterized_benchmark.cpp.

Definition at line 32 of file current_invocation_context.h.

◆ do_not_optimize()

template<typename T>
void stat_bench::do_not_optimize ( T && val)
inlinenoexcept

Prevent compilers to optimize away a value.

Warning
This won't prevent optimizations in processes to evaluate the value.
Template Parameters
TType.
Parameters
[in]valValue.

Definition at line 43 of file do_not_optimize.h.

◆ memory_barrier()

void stat_bench::memory_barrier ( )
inlinenoexcept

Prevent optimizers to move memory access beyond this function call.

Definition at line 29 of file memory_barrier.h.

◆ operator!=() [1/3]

auto stat_bench::operator!= ( const BenchmarkCaseName & lhs,
const BenchmarkCaseName & rhs ) -> bool
inlinenodiscardnoexcept

Compare two BenchmarkCaseName objects.

Parameters
[in]lhsLeft-hand side object.
[in]rhsRight-hand side object.
Return values
trueThe two objects are not equal.
falseThe two objects are equal.

Definition at line 87 of file benchmark_case_name.h.

◆ operator!=() [2/3]

auto stat_bench::operator!= ( const BenchmarkGroupName & lhs,
const BenchmarkGroupName & rhs ) -> bool
inlinenodiscardnoexcept

Compare two BenchmarkGroupName objects.

Parameters
[in]lhsLeft-hand side object.
[in]rhsRight-hand side object.
Return values
trueThe two objects are not equal.
falseThe two objects are equal.

Definition at line 87 of file benchmark_group_name.h.

◆ operator!=() [3/3]

auto stat_bench::operator!= ( const CustomOutputName & lhs,
const CustomOutputName & rhs ) -> bool
inlinenodiscardnoexcept

Compare two CustomOutputName objects.

Parameters
[in]lhsLeft-hand side object.
[in]rhsRight-hand side object.
Return values
trueThe two objects are not equal.
falseThe two objects are equal.

Definition at line 85 of file custom_output_name.h.

◆ operator<<() [1/3]

auto stat_bench::operator<< ( std::ostream & stream,
const BenchmarkCaseName & val ) -> std::ostream&
inline

Format to a stream.

Parameters
[in,out]streamStream.
[in]valValue.
Returns
Stream.

Definition at line 127 of file benchmark_case_name.h.

◆ operator<<() [2/3]

auto stat_bench::operator<< ( std::ostream & stream,
const BenchmarkGroupName & val ) -> std::ostream&
inline

Format to a stream.

Parameters
[in,out]streamStream.
[in]valValue.
Returns
Stream.

Definition at line 127 of file benchmark_group_name.h.

◆ operator<<() [3/3]

auto stat_bench::operator<< ( std::ostream & stream,
const CustomOutputName & val ) -> std::ostream&
inline

Format to a stream.

Parameters
[in,out]streamStream.
[in]valValue.
Returns
Stream.

Definition at line 126 of file custom_output_name.h.

◆ operator==() [1/3]

auto stat_bench::operator== ( const BenchmarkCaseName & lhs,
const BenchmarkCaseName & rhs ) -> bool
inlinenodiscardnoexcept

Compare two BenchmarkCaseName objects.

Parameters
[in]lhsLeft-hand side object.
[in]rhsRight-hand side object.
Return values
trueThe two objects are equal.
falseThe two objects are not equal.

Definition at line 74 of file benchmark_case_name.h.

◆ operator==() [2/3]

auto stat_bench::operator== ( const BenchmarkGroupName & lhs,
const BenchmarkGroupName & rhs ) -> bool
inlinenodiscardnoexcept

Compare two BenchmarkGroupName objects.

Parameters
[in]lhsLeft-hand side object.
[in]rhsRight-hand side object.
Return values
trueThe two objects are equal.
falseThe two objects are not equal.

Definition at line 74 of file benchmark_group_name.h.

◆ operator==() [3/3]

auto stat_bench::operator== ( const CustomOutputName & lhs,
const CustomOutputName & rhs ) -> bool
inlinenodiscardnoexcept

Compare two CustomOutputName objects.

Parameters
[in]lhsLeft-hand side object.
[in]rhsRight-hand side object.
Return values
trueThe two objects are equal.
falseThe two objects are not equal.

Definition at line 72 of file custom_output_name.h.