#include <Profiler.h>
Public Member Functions | |
| double | getMaxTime (const std::string &name="") const |
| double | getMeanTime (const std::string &name="") const |
| double | getMinTime (const std::string &name="") const |
| double | getStdevTime (const std::string &name="") const |
| void | getTime (std::vector< double > &time, const std::string &name="") const |
| void | profile (const std::string &name="") |
| Profiler () | |
| void | stop (const std::string &name="") |
| void | stopAndScale (double scale, const std::string &name="") |
| virtual | ~Profiler () |
Protected Attributes | |
| std::string | m_last_profile |
| std::map< std::string, std::vector< double > > | m_profiles |
| std::map< std::string, Timestamp > | m_start_points |
Definition at line 48 of file Profiler.h.
| DUtils::Profiler::Profiler | ( | ) | [inline] |
Definition at line 52 of file Profiler.h.
| virtual DUtils::Profiler::~Profiler | ( | ) | [inline, virtual] |
Definition at line 53 of file Profiler.h.
| double Profiler::getMaxTime | ( | const std::string & | name = "" | ) | const |
Definition at line 117 of file Profiler.cpp.
| double Profiler::getMeanTime | ( | const std::string & | name = "" | ) | const |
Definition at line 75 of file Profiler.cpp.
| double Profiler::getMinTime | ( | const std::string & | name = "" | ) | const |
Definition at line 103 of file Profiler.cpp.
| double Profiler::getStdevTime | ( | const std::string & | name = "" | ) | const |
Definition at line 89 of file Profiler.cpp.
| void Profiler::getTime | ( | std::vector< double > & | time, |
| const std::string & | name = "" |
||
| ) | const |
Definition at line 132 of file Profiler.cpp.
| void Profiler::profile | ( | const std::string & | name = "" | ) |
Starts profiling the given item. If it was already been profiled, the last call to profile with that item is ignored
| name | name of item to profile |
Definition at line 38 of file Profiler.cpp.
| void DUtils::Profiler::stop | ( | const std::string & | name = "" | ) | [inline] |
Stops profiling the given item or the last one if this is not provided. Adds the elapsed time to the sum of this item profile time
| name | item name |
Definition at line 75 of file Profiler.h.
| void Profiler::stopAndScale | ( | double | scale, |
| const std::string & | name = "" |
||
| ) |
Does the same as Profiler::stop, but multiplies the elapsed time by the given scale factor
| scale | stored_duration = actual_duration * scale |
| name | item name |
Definition at line 49 of file Profiler.cpp.
std::string DUtils::Profiler::m_last_profile [protected] |
Definition at line 90 of file Profiler.h.
std::map<std::string, std::vector<double> > DUtils::Profiler::m_profiles [protected] |
Definition at line 88 of file Profiler.h.
std::map<std::string, Timestamp> DUtils::Profiler::m_start_points [protected] |
Definition at line 89 of file Profiler.h.