Time Measuring and Counting

The same group on the Doxygen site.

group Time Measuring and Counting

Simple tools for measuring the performance of algorithms.

This group contains simple tools for measuring the performance of algorithms.

Classes

Class

Description

Counter

A counter class.

NoCounter

‘Do nothing’ version of Counter.

TimeStamp

A class to store (cpu)time instances.

Timer

Class for measuring the cpu time and real time usage of the process.

TimeReport

Same as Timer but prints a report on destruction.

NoTimeReport

‘Do nothing’ version of TimeReport

Functions and other members

inline TimeStamp operator*( double b , const TimeStamp & t )
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.

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.

  • num – [out] if it is not NULL, then the actual number of execution of f will be written into * num.

  • full_time – [out] if it is not NULL, then the actual total running time will be written into * full_time.

Returns:

The average running time of f.