Overview   Class List   Class Hierarchy   Class Members   Functions & Constants   Defines   Header Files  

uima::Timer Class Reference

List of all members.


Detailed Description

Class ClTimer is a tool class to help with timing.

It includes some useful string output for timers.

Formated string output for timer data

std::string getDescription (size_t padWidth=35) const
 Returns the description from the constructor (used by follwing functions).
void setDescription (const std::string &crstrDesc)
 Returns the description from the constructor (used by follwing functions).
std::string timeString () const
 Returns <DESCRIPTION>: <accumulatedTime> seconds.
std::string relativeThroughputString (size_t items, const std::string &itemsname="") const
 Returns <DESCRIPTION>: <items/accumulatedTime> <itemname> / second.
std::string percentString (double relative_to_seconds) const
 Returns <DESCRIPTION>: <accumulatedTime/relative_to_seconds>%.
std::string percentString (const Timer &relative_to_timer) const
 Returns <DESCRIPTION>: <accumulatedTime/relative_to_seconds>%.
std::string timeAndPercentString (double relative_to_seconds) const
 Returns absolute (timeString) and relative (percentString) as one string.
std::string timeAndPercentString (const Timer &relative_to_timer) const
 Returns absolute (timeString) and relative (percentString) as one string.
std::string timeAndPercentAndThroughputString (double relative_to_seconds, size_t relative_to_items, const std::string &itemsname="") const
 Returns combination of timeAndPercentString plus relativeThroughputString.
static std::string timeString (double dTime)

Public Member Functions

 Timer (const std::string &clstrDescription="")
 Constructor.
void start (void)
void stop (void)
void reset (void)
double getAccumulatedTime (void) const
 Retrieve the accumulated time To avoid division by zero errors we never return zero but FLT_MIN instead.
double getTimeSoFar () const
 Returns timed time up to now.
Operators to combine timers
Timer operator+ (const Timer &crclOther) const
 Addition of timers.
Timer operator- (const Timer &crclOther) const
 Subtraction of timers.


Constructor & Destructor Documentation

uima::Timer::Timer ( const std::string &  clstrDescription = ""  )  [inline]

Constructor.


Member Function Documentation

void uima::Timer::start ( void   )  [inline]

void uima::Timer::stop ( void   )  [inline]

void uima::Timer::reset ( void   )  [inline]

double uima::Timer::getAccumulatedTime ( void   )  const [inline]

Retrieve the accumulated time To avoid division by zero errors we never return zero but FLT_MIN instead.

double uima::Timer::getTimeSoFar (  )  const [inline]

Returns timed time up to now.

std::string uima::Timer::getDescription ( size_t  padWidth = 35  )  const

Returns the description from the constructor (used by follwing functions).

void uima::Timer::setDescription ( const std::string &  crstrDesc  )  [inline]

Returns the description from the constructor (used by follwing functions).

Referenced by operator+(), and operator-().

std::string uima::Timer::timeString (  )  const

Returns <DESCRIPTION>: <accumulatedTime> seconds.

std::string uima::Timer::relativeThroughputString ( size_t  items,
const std::string &  itemsname = "" 
) const

Returns <DESCRIPTION>: <items/accumulatedTime> <itemname> / second.

std::string uima::Timer::percentString ( double  relative_to_seconds  )  const

Returns <DESCRIPTION>: <accumulatedTime/relative_to_seconds>%.

std::string uima::Timer::percentString ( const Timer relative_to_timer  )  const

Returns <DESCRIPTION>: <accumulatedTime/relative_to_seconds>%.

std::string uima::Timer::timeAndPercentString ( double  relative_to_seconds  )  const

Returns absolute (timeString) and relative (percentString) as one string.

std::string uima::Timer::timeAndPercentString ( const Timer relative_to_timer  )  const

Returns absolute (timeString) and relative (percentString) as one string.

std::string uima::Timer::timeAndPercentAndThroughputString ( double  relative_to_seconds,
size_t  relative_to_items,
const std::string &  itemsname = "" 
) const

Returns combination of timeAndPercentString plus relativeThroughputString.

static std::string uima::Timer::timeString ( double  dTime  )  [static]

Timer uima::Timer::operator+ ( const Timer crclOther  )  const [inline]

Addition of timers.

References iv_strDecscription, and setDescription().

Timer uima::Timer::operator- ( const Timer crclOther  )  const [inline]

Subtraction of timers.

References iv_strDecscription, and setDescription().


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

Generated on Mon Oct 1 11:15:09 2012 for UIMACPP API by  doxygen 1.5.6