Time measuring and Counting
[Miscellaneous Tools]


Detailed Description

Here you can find simple tools for measuring the performance of algorithms.


Files

file  counter.h
 Tools for counting steps and events.
file  time_measure.h
 Tools for measuring cpu usage.

Classes

class  Counter
 A counter class. More...
class  NoCounter
 'Do nothing' version of Counter More...
class  TimeStamp
 A class to store (cpu)time instances. More...
class  Timer
 Class for measuring the cpu time and real time usage of the process. More...
class  TimeReport
 Same as Timer but prints a report on destruction. More...
class  NoTimeReport
 'Do nothing' version of TimeReport More...

Functions

template<class F>
TimeStamp runningTimeTest (F f, double min_time=10, unsigned int *num=NULL, TimeStamp *full_time=NULL)
 Tool to measure the running time more exactly.


Function Documentation

TimeStamp lemon::runningTimeTest ( f,
double  min_time = 10,
unsigned int *  num = NULL,
TimeStamp *  full_time = NULL 
)

This function calls f several times and returns the average running time. The number of the executions will be choosen in such a way that the full real running time will be roughly between min_time and 2*min_time.

Parameters:
f the function object to be measured.
min_time the minimum total running time.
Return values:
num if it is not NULL, then the actual number of execution of f will be written into *num.
full_time if it is not NULL, then the actual total running time will be written into *full_time.
Returns:
The average running time of f.


Generated on Tue Oct 31 09:49:38 2006 for LEMON by  doxygen 1.5.1