![]() |
abLEMON 1.9.0-101-gccb8629
A maintained fork of LEMON
|
Simple tools for measuring the performance of algorithms. More...
Files | |
| file | counter.h |
| file | time_measure.h |
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. | |
| std::ostream & | operator<< (std::ostream &os, const TimeStamp &t) |
| Prints the time counters. | |
This group contains simple tools for measuring the performance of algorithms.
| TimeStamp runningTimeTest | ( | F | 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.
| f | the function object to be measured. | |
| min_time | the minimum total running time. | |
| [out] | num | if it is not NULL, then the actual number of execution of f will be written into * num. |
| [out] | full_time | if it is not NULL, then the actual total running time will be written into * full_time. |
f.
|
Prints the time counters in the following form:
u: XX.XXs, s: XX.XXs, cu: XX.XXs, cs: XX.XXs, real: XX.XXs
where the values are the
u: user cpu time, s: system cpu time, cu: user cpu time of children, cs: system cpu time of children, real: real time.