ZeroErr
zeroerr::PerformanceCounter Struct Reference

PerformanceCounter is a class to measure the performance of a function. More...

#include <benchmark.h>

Collaboration diagram for zeroerr::PerformanceCounter:

Public Member Functions

 PerformanceCounter ()
 
 ~PerformanceCounter ()
 
void beginMeasure ()
 
void endMeasure ()
 
void updateResults (uint64_t numIters)
 
PerfCountSet< uint64_t > const & val () const noexcept
 
PerfCountSet< bool > has () const noexcept
 

Static Public Member Functions

static PerformanceCounterinst ()
 

Public Attributes

Clock::duration elapsed
 

Protected Attributes

Clock::time_point _start
 
PerfCountSet< uint64_t > _val
 
PerfCountSet< bool > _has
 
detail::LinuxPerformanceCounter * _perf = nullptr
 
detail::WindowsPerformanceCounter * win_perf = nullptr
 

Detailed Description

PerformanceCounter is a class to measure the performance of a function.

Constructor & Destructor Documentation

◆ PerformanceCounter()

zeroerr::PerformanceCounter::PerformanceCounter ( )

◆ ~PerformanceCounter()

zeroerr::PerformanceCounter::~PerformanceCounter ( )

Member Function Documentation

◆ beginMeasure()

void zeroerr::PerformanceCounter::beginMeasure ( )

◆ endMeasure()

void zeroerr::PerformanceCounter::endMeasure ( )

◆ has()

PerfCountSet<bool> zeroerr::PerformanceCounter::has ( ) const
inlinenoexcept

◆ inst()

PerformanceCounter & zeroerr::PerformanceCounter::inst ( )
static

◆ updateResults()

void zeroerr::PerformanceCounter::updateResults ( uint64_t  numIters)

◆ val()

PerfCountSet<uint64_t> const& zeroerr::PerformanceCounter::val ( ) const
inlinenoexcept

Member Data Documentation

◆ _has

PerfCountSet<bool> zeroerr::PerformanceCounter::_has
protected

◆ _perf

detail::LinuxPerformanceCounter* zeroerr::PerformanceCounter::_perf = nullptr
protected

◆ _start

Clock::time_point zeroerr::PerformanceCounter::_start
protected

◆ _val

PerfCountSet<uint64_t> zeroerr::PerformanceCounter::_val
protected

◆ elapsed

Clock::duration zeroerr::PerformanceCounter::elapsed

◆ win_perf

detail::WindowsPerformanceCounter* zeroerr::PerformanceCounter::win_perf = nullptr
protected

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