NeoPZ
|
#include <stats_recorder.h>
Public Member Functions | |
RunStatsRecorder () | |
~RunStatsRecorder () | |
void | start () |
void | stop () |
void | lap () |
void | print (ostream &os) const |
int | append_to (CSVStringTable &st) const |
int | update_row (CSVStringTable &st, unsigned row) const |
void | clear () |
Private Attributes | |
vector< RunStat * > | stat_items |
unsigned | n_laps |
Class to record execution statistics. For performance reasons it should be declared globally in order to ensure it is only constructed and destructed once.
Definition at line 715 of file stats_recorder.h.
|
inline |
Constructor. Create the RunStat items that should be measured.
Definition at line 720 of file stats_recorder.h.
|
inline |
Destructor.
vector::clear Removes all elements from the vector (which are destroyed), leaving the container with a size of 0.
Definition at line 739 of file stats_recorder.h.
|
inline |
Append metrics to the statistics table. The idea is to keep one table for each segment of code. New runs are appended to the table. Returns: the new_row number if Ok the setCell error code (< 0) if Error.
Definition at line 785 of file stats_recorder.h.
References CSVTable< Tvar >::addRows().
|
inline |
Definition at line 815 of file stats_recorder.h.
|
inline |
Stops the current measurement and starts a new one.
Definition at line 768 of file stats_recorder.h.
|
inline |
Prints the statistics
Definition at line 771 of file stats_recorder.h.
|
inline |
Starts recording the execution statistics.
Definition at line 751 of file stats_recorder.h.
|
inline |
Stops recording the execution statistics.
Definition at line 759 of file stats_recorder.h.
|
inline |
Update a row at the statistics table. Returns: 0 if Ok the setCell error code (< 0) if Error.
Definition at line 801 of file stats_recorder.h.
|
private |
Definition at line 828 of file stats_recorder.h.
|
private |
Array of statistics items.
Definition at line 826 of file stats_recorder.h.