This group contains simple tools for measuring the performance of algorithms.
|
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.
|
|
TimeStamp lemon::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
.
- 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
.
std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const TimeStamp & |
t |
|
) |
| |
|
related |
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.
- Note
- On
WIN32
platform the cummulative values are not calculated.