Public Member Functions | Protected Attributes | List of all members
Eigen::BenchTimer Class Reference

#include <BenchTimer.h>

Public Member Functions

 BenchTimer ()
 
double best (int TIMER=CPU_TIMER) const
 
double getCpuTime () const
 
double getRealTime () const
 
void reset ()
 
void start ()
 
void stop ()
 
double total (int TIMER=CPU_TIMER) const
 
double value (int TIMER=CPU_TIMER) const
 
double worst (int TIMER=CPU_TIMER) const
 
 ~BenchTimer ()
 

Protected Attributes

Vector2d m_bests
 
Vector2d m_starts
 
Vector2d m_times
 
Vector2d m_totals
 
Vector2d m_worsts
 

Detailed Description

Elapsed time timer keeping the best try.

On POSIX platforms we use clock_gettime with CLOCK_PROCESS_CPUTIME_ID. On Windows we use QueryPerformanceCounter

Important: on linux, you must link with -lrt

Definition at line 55 of file BenchTimer.h.

Constructor & Destructor Documentation

Eigen::BenchTimer::BenchTimer ( )
inline

Definition at line 59 of file BenchTimer.h.

Eigen::BenchTimer::~BenchTimer ( )
inline

Definition at line 69 of file BenchTimer.h.

Member Function Documentation

double Eigen::BenchTimer::best ( int  TIMER = CPU_TIMER) const
inline

Return the best elapsed time in seconds

Definition at line 107 of file BenchTimer.h.

double Eigen::BenchTimer::getCpuTime ( ) const
inline

Definition at line 126 of file BenchTimer.h.

double Eigen::BenchTimer::getRealTime ( ) const
inline

Definition at line 141 of file BenchTimer.h.

void Eigen::BenchTimer::reset ( )
inline

Definition at line 71 of file BenchTimer.h.

void Eigen::BenchTimer::start ( )
inline

Definition at line 77 of file BenchTimer.h.

void Eigen::BenchTimer::stop ( )
inline

Definition at line 82 of file BenchTimer.h.

double Eigen::BenchTimer::total ( int  TIMER = CPU_TIMER) const
inline

Return the total elapsed time in seconds.

Definition at line 121 of file BenchTimer.h.

double Eigen::BenchTimer::value ( int  TIMER = CPU_TIMER) const
inline

Return the elapsed time in seconds between the last start/stop pair

Definition at line 100 of file BenchTimer.h.

double Eigen::BenchTimer::worst ( int  TIMER = CPU_TIMER) const
inline

Return the worst elapsed time in seconds

Definition at line 114 of file BenchTimer.h.

Member Data Documentation

Vector2d Eigen::BenchTimer::m_bests
protected

Definition at line 162 of file BenchTimer.h.

Vector2d Eigen::BenchTimer::m_starts
protected

Definition at line 160 of file BenchTimer.h.

Vector2d Eigen::BenchTimer::m_times
protected

Definition at line 161 of file BenchTimer.h.

Vector2d Eigen::BenchTimer::m_totals
protected

Definition at line 164 of file BenchTimer.h.

Vector2d Eigen::BenchTimer::m_worsts
protected

Definition at line 163 of file BenchTimer.h.


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


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:52:09