Bitcoin Core 28.99.0
P2P Digital Currency
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages Concepts
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | List of all members
ankerl::nanobench::Result Class Reference

#include <nanobench.h>

Collaboration diagram for ankerl::nanobench::Result:
[legend]

Public Types

enum class  Measure : size_t {
  elapsed , iterations , pagefaults , cpucycles ,
  contextswitches , instructions , branchinstructions , branchmisses ,
  _size
}
 

Public Member Functions

 Result (Config benchmarkConfig)
 
 ~Result ()
 
Resultoperator= (Result const &other)
 
Resultoperator= (Result &&other) noexcept(ANKERL_NANOBENCH(NOEXCEPT_STRING_MOVE))
 
 Result (Result const &other)
 
 Result (Result &&other) noexcept
 
void add (Clock::duration totalElapsed, uint64_t iters, detail::PerformanceCounters const &pc)
 
 ANKERL_NANOBENCH (NODISCARD) Config const &config() const noexcept
 
 ANKERL_NANOBENCH (NODISCARD) double median(Measure m) const
 
 ANKERL_NANOBENCH (NODISCARD) double medianAbsolutePercentError(Measure m) const
 
 ANKERL_NANOBENCH (NODISCARD) double average(Measure m) const
 
 ANKERL_NANOBENCH (NODISCARD) double sum(Measure m) const noexcept
 
 ANKERL_NANOBENCH (NODISCARD) double sumProduct(Measure m1
 
 ANKERL_NANOBENCH (NODISCARD) double minimum(Measure m) const noexcept
 
 ANKERL_NANOBENCH (NODISCARD) double maximum(Measure m) const noexcept
 
ANKERL_NANOBENCH(NODISCARD) std ANKERL_NANOBENCH(NODISCARD) std ANKERL_NANOBENCH (NODISCARD) bool has(Measure m) const noexcept
 
 ANKERL_NANOBENCH (NODISCARD) double get(size_t idx
 
 ANKERL_NANOBENCH (NODISCARD) bool empty() const noexcept
 
 ANKERL_NANOBENCH (NODISCARD) size_t size() const noexcept
 

Static Public Member Functions

static Measure fromString (std::string const &str)
 

Public Attributes

Measure m2 const noexcept
 
Measureconst
 

Private Attributes

Config mConfig {}
 
std::vector< std::vector< double > > mNameToMeasurements {}
 

Detailed Description

Definition at line 419 of file nanobench.h.

Member Enumeration Documentation

◆ Measure

enum class ankerl::nanobench::Result::Measure : size_t
strong
Enumerator
elapsed 
iterations 
pagefaults 
cpucycles 
contextswitches 
instructions 
branchinstructions 
branchmisses 
_size 

Definition at line 421 of file nanobench.h.

Constructor & Destructor Documentation

◆ Result() [1/3]

ankerl::nanobench::Result::Result ( Config  benchmarkConfig)
explicit

◆ ~Result()

ankerl::nanobench::Result::~Result ( )

◆ Result() [2/3]

ankerl::nanobench::Result::Result ( Result const other)

◆ Result() [3/3]

ankerl::nanobench::Result::Result ( Result &&  other)
noexcept

Member Function Documentation

◆ add()

void ankerl::nanobench::Result::add ( Clock::duration  totalElapsed,
uint64_t  iters,
detail::PerformanceCounters const pc 
)

◆ ANKERL_NANOBENCH() [1/12]

ankerl::nanobench::Result::ANKERL_NANOBENCH ( NODISCARD  ) const
noexcept

◆ ANKERL_NANOBENCH() [2/12]

ANKERL_NANOBENCH(NODISCARD) std ANKERL_NANOBENCH(NODISCARD) std ankerl::nanobench::Result::ANKERL_NANOBENCH ( NODISCARD  ) const
noexcept

◆ ANKERL_NANOBENCH() [3/12]

ankerl::nanobench::Result::ANKERL_NANOBENCH ( NODISCARD  ) const &
noexcept

◆ ANKERL_NANOBENCH() [4/12]

ankerl::nanobench::Result::ANKERL_NANOBENCH ( NODISCARD  ) const

◆ ANKERL_NANOBENCH() [5/12]

ankerl::nanobench::Result::ANKERL_NANOBENCH ( NODISCARD  )

◆ ANKERL_NANOBENCH() [6/12]

ankerl::nanobench::Result::ANKERL_NANOBENCH ( NODISCARD  ) const
noexcept

◆ ANKERL_NANOBENCH() [7/12]

ankerl::nanobench::Result::ANKERL_NANOBENCH ( NODISCARD  ) const

◆ ANKERL_NANOBENCH() [8/12]

ankerl::nanobench::Result::ANKERL_NANOBENCH ( NODISCARD  ) const

◆ ANKERL_NANOBENCH() [9/12]

ankerl::nanobench::Result::ANKERL_NANOBENCH ( NODISCARD  ) const
noexcept

◆ ANKERL_NANOBENCH() [10/12]

ankerl::nanobench::Result::ANKERL_NANOBENCH ( NODISCARD  ) const
noexcept

◆ ANKERL_NANOBENCH() [11/12]

ankerl::nanobench::Result::ANKERL_NANOBENCH ( NODISCARD  )

◆ ANKERL_NANOBENCH() [12/12]

ankerl::nanobench::Result::ANKERL_NANOBENCH ( NODISCARD  ) const
noexcept

◆ fromString()

static Measure ankerl::nanobench::Result::fromString ( std::string const str)
static

◆ operator=() [1/2]

Result & ankerl::nanobench::Result::operator= ( Result &&  other)
noexcept

◆ operator=() [2/2]

Result & ankerl::nanobench::Result::operator= ( Result const other)

Member Data Documentation

◆ const

Measure m ankerl::nanobench::Result::const

Definition at line 458 of file nanobench.h.

◆ mConfig

Config ankerl::nanobench::Result::mConfig {}
private

Definition at line 466 of file nanobench.h.

◆ mNameToMeasurements

std::vector<std::vector<double> > ankerl::nanobench::Result::mNameToMeasurements {}
private

Definition at line 467 of file nanobench.h.

◆ noexcept

Measure m2 const ankerl::nanobench::Result::noexcept

Definition at line 451 of file nanobench.h.


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