Classes | Functions | Variables

Performance Timers API
[General Utility Libraries]

A set of simple timers (and time objects) used to quickly generate information about how the code is performing. More...

Collaboration diagram for Performance Timers API:

Classes

struct  perf::time_t
 yes, my own time_t for convenience in the perf library More...
class  perf::Timer
 Timer class -- just throw one of these on the stack with a unique name. More...
class  perf::DebugTimer

Functions

 perf::time_t::time_t (void) throw ()
void perf::time_t::increment (const time_t &t) throw ()
void perf::time_t::decrement (const time_t &t) throw ()
bool perf::time_t::isGreaterThan (const time_t &t) const throw ()
double perf::time_t::getSeconds (void) const throw ()
long perf::time_t::getMicroseconds (void) const throw ()
void perf::time_t::clear (void) throw ()
void perf::time_t::set (long in_sec, long in_usec) throw ()
 perf::Timer::~Timer (void)
 perf::Timer::Timer (const Timer &)
const Timer & perf::Timer::operator= (const Timer &)
 perf::DebugTimer::~DebugTimer (void) throw ()
 perf::DebugTimer::DebugTimer (const DebugTimer &)
const DebugTimer & perf::DebugTimer::operator= (const DebugTimer &)

Variables

long perf::time_t::seconds
long perf::time_t::useconds
time_t perf::Timer::m_start_time
void * perf::Timer::m_context
time_t perf::DebugTimer::m_start_time
std::string perf::DebugTimer::m_msg



time_t perf::getNow (void) throw ()
 return time_t object containing current time
void perf::enableTimers (bool enabled) throw ()
 you can disable the timing system it is better to remove verbose timers, however!
void perf::getTimingSummary (std::string &)
 return a string containing (human-readable) formatted timing information
void perf::dumpTimingSummary (std::ostream &)
 dumps timing summary to the given stream

Detailed Description

A set of simple timers (and time objects) used to quickly generate information about how the code is performing.


Function Documentation

perf::time_t::time_t ( void   )  throw () [inline, inherited]

Definition at line 64 of file perf.h.

void perf::time_t::increment ( const time_t t  )  throw () [inline, inherited]

Definition at line 66 of file perf.h.

void perf::time_t::decrement ( const time_t t  )  throw () [inline, inherited]

Definition at line 77 of file perf.h.

bool perf::time_t::isGreaterThan ( const time_t t  )  const throw () [inline, inherited]

Definition at line 109 of file perf.h.

double perf::time_t::getSeconds ( void   )  const throw () [inline, inherited]

Definition at line 117 of file perf.h.

long perf::time_t::getMicroseconds ( void   )  const throw () [inline, inherited]

Definition at line 121 of file perf.h.

void perf::time_t::clear ( void   )  throw () [inline, inherited]

Definition at line 125 of file perf.h.

void perf::time_t::set ( long  in_sec,
long  in_usec 
) throw () [inline, inherited]

Definition at line 129 of file perf.h.

perf::Timer::~Timer ( void   )  [inherited]

Definition at line 144 of file perf.cpp.

perf::Timer::Timer ( const Timer  )  [private, inherited]
const Timer& perf::Timer::operator= ( const Timer  )  [private, inherited]
perf::DebugTimer::~DebugTimer ( void   )  throw () [inherited]

Definition at line 170 of file perf.cpp.

perf::DebugTimer::DebugTimer ( const DebugTimer  )  [private, inherited]
const DebugTimer& perf::DebugTimer::operator= ( const DebugTimer  )  [private, inherited]
time_t perf::getNow ( void   )  throw ()

return time_t object containing current time

void perf::enableTimers ( bool  enabled  )  throw ()

you can disable the timing system it is better to remove verbose timers, however!

TODO: remove this function altogether?

void perf::getTimingSummary ( std::string &  out  ) 

return a string containing (human-readable) formatted timing information

void perf::dumpTimingSummary ( std::ostream &  stream  ) 

dumps timing summary to the given stream


Variable Documentation

long perf::time_t::seconds [private, inherited]

Definition at line 140 of file perf.h.

long perf::time_t::useconds [private, inherited]

Definition at line 141 of file perf.h.

time_t perf::Timer::m_start_time [private, inherited]

Definition at line 180 of file perf.h.

void* perf::Timer::m_context [private, inherited]

Definition at line 181 of file perf.h.

time_t perf::DebugTimer::m_start_time [private, inherited]

Definition at line 202 of file perf.h.

std::string perf::DebugTimer::m_msg [private, inherited]

Definition at line 203 of file perf.h.