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 59 of file BenchTimer.h.

Constructor & Destructor Documentation

◆ BenchTimer()

Eigen::BenchTimer::BenchTimer ( )
inline

Definition at line 63 of file BenchTimer.h.

◆ ~BenchTimer()

Eigen::BenchTimer::~BenchTimer ( )
inline

Definition at line 73 of file BenchTimer.h.

Member Function Documentation

◆ best()

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

Return the best elapsed time in seconds

Definition at line 111 of file BenchTimer.h.

◆ getCpuTime()

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

Definition at line 130 of file BenchTimer.h.

◆ getRealTime()

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

Definition at line 145 of file BenchTimer.h.

◆ reset()

void Eigen::BenchTimer::reset ( )
inline

Definition at line 75 of file BenchTimer.h.

◆ start()

void Eigen::BenchTimer::start ( )
inline

Definition at line 81 of file BenchTimer.h.

◆ stop()

void Eigen::BenchTimer::stop ( )
inline

Definition at line 86 of file BenchTimer.h.

◆ total()

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

Return the total elapsed time in seconds.

Definition at line 125 of file BenchTimer.h.

◆ value()

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 104 of file BenchTimer.h.

◆ worst()

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

Return the worst elapsed time in seconds

Definition at line 118 of file BenchTimer.h.

Member Data Documentation

◆ m_bests

Vector2d Eigen::BenchTimer::m_bests
protected

Definition at line 166 of file BenchTimer.h.

◆ m_starts

Vector2d Eigen::BenchTimer::m_starts
protected

Definition at line 164 of file BenchTimer.h.

◆ m_times

Vector2d Eigen::BenchTimer::m_times
protected

Definition at line 165 of file BenchTimer.h.

◆ m_totals

Vector2d Eigen::BenchTimer::m_totals
protected

Definition at line 168 of file BenchTimer.h.

◆ m_worsts

Vector2d Eigen::BenchTimer::m_worsts
protected

Definition at line 167 of file BenchTimer.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:41:21