VPTissue Reference Manual
|
Utility class to record durations in a cumulative manner. More...
#include <CumulativeRecords.h>
Public Types | |
using | Duration = T |
Public Member Functions | |
void | Clear () |
Clear the entire set of records. | |
unsigned int | GetCount (const std::string &name) const |
Return count for records with name. | |
Duration | GetCumulative (const std::string &name) const |
Return cumulative time for records with name. | |
Duration | GetMean (const std::string &name) const |
Return cumulative time for records with name. | |
std::list< std::string > | GetNames () const |
Return list of names. | |
template<typename U = std::chrono::seconds> | |
CumulativeRecords< U > | GetRecords () const |
Return records for all names in duration unit U. | |
CumulativeRecords< Duration > | GetRecords () const |
Return records for all names in durations Duration (so no casting). | |
bool | IsPresent (const std::string &name) const |
Return whether there are records associated with a given name. | |
template<typename U > | |
void | Merge (const CumulativeRecords< U > &extra) |
Merge an extra set of records (casting durations if required). | |
void | Merge (const CumulativeRecords< Duration > &extra) |
Merge an extra set of records of same Duration (no casting). | |
template<typename R , typename P > | |
void | Record (const std::string &name, const std::chrono::duration< R, P > &duration) |
Record the duration for the given name. | |
void | Record (const std::string &name, const Duration &duration) |
Record the duration for the given name. | |
Utility class to record durations in a cumulative manner.
Records durations associated with a name. Template parameter is duration type (default std::chrono::seconds).
Definition at line 44 of file CumulativeRecords.h.