A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X), among other stats. More...
#include <mrpt/utils/CTimeLogger.h>


Classes | |
| struct | TCallData |
| Data of all the calls:. More... | |
Public Member Functions | |
| CTimeLogger () | |
| virtual | ~CTimeLogger () |
| Default constructor. | |
| std::string | getStatsAsText (const size_t column_width=80) const |
| Dump all stats to a multi-line text string. | |
| void | dumpAllStats (const size_t column_width=80) const |
| Dump all stats through the CDebugOutputCapable interface. | |
| void | clear () |
| void | enable (bool enabled=true) |
| void | disable () |
| void | saveToCSVFile (const std::string &csv_file) const |
| Dump all stats to a Comma Separated Values (CSV) file. | |
| void | enter (const char *func_name) |
| Start of a named section. | |
| double | leave (const char *func_name) |
| End of a named section. | |
Private Member Functions | |
| void | do_enter (const char *func_name) |
| double | do_leave (const char *func_name) |
Private Attributes | |
| CTicTac | m_tictac |
| bool | m_enabled |
| map< string, TCallData > | m_data |
A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X), among other stats.
The results can be dumped to cout or to Visual Studio's output panel. Recursive methods are supported with no problems, that is, calling "enter(X) enter(X) ... leave(X) leave(X)".
Definition at line 47 of file CTimeLogger.h.
| mrpt::utils::CTimeLogger::CTimeLogger | ( | ) |
| virtual mrpt::utils::CTimeLogger::~CTimeLogger | ( | ) | [virtual] |
Default constructor.
Destructor
| void mrpt::utils::CTimeLogger::clear | ( | ) |
| void mrpt::utils::CTimeLogger::disable | ( | ) | [inline] |
Definition at line 75 of file CTimeLogger.h.
| void mrpt::utils::CTimeLogger::do_enter | ( | const char * | func_name | ) | [private] |
| double mrpt::utils::CTimeLogger::do_leave | ( | const char * | func_name | ) | [private] |
| void mrpt::utils::CTimeLogger::dumpAllStats | ( | const size_t | column_width = 80 |
) | const |
Dump all stats through the CDebugOutputCapable interface.
| void mrpt::utils::CTimeLogger::enable | ( | bool | enabled = true |
) | [inline] |
Definition at line 74 of file CTimeLogger.h.
Referenced by mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::runOneKalmanIteration().
| void mrpt::utils::CTimeLogger::enter | ( | const char * | func_name | ) | [inline] |
Start of a named section.
Definition at line 79 of file CTimeLogger.h.
Referenced by mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::runOneKalmanIteration(), and mrpt::bayes::detail::runOneKalmanIteration_addNewLandmarks().
| std::string mrpt::utils::CTimeLogger::getStatsAsText | ( | const size_t | column_width = 80 |
) | const |
Dump all stats to a multi-line text string.
| double mrpt::utils::CTimeLogger::leave | ( | const char * | func_name | ) | [inline] |
End of a named section.
Definition at line 84 of file CTimeLogger.h.
Referenced by mrpt::bayes::CKalmanFilterCapable< 7, 3, 3, 7 >::runOneKalmanIteration(), and mrpt::bayes::detail::runOneKalmanIteration_addNewLandmarks().
| void mrpt::utils::CTimeLogger::saveToCSVFile | ( | const std::string & | csv_file | ) | const |
Dump all stats to a Comma Separated Values (CSV) file.
map<string,TCallData> mrpt::utils::CTimeLogger::m_data [private] |
Definition at line 63 of file CTimeLogger.h.
bool mrpt::utils::CTimeLogger::m_enabled [private] |
Definition at line 51 of file CTimeLogger.h.
CTicTac mrpt::utils::CTimeLogger::m_tictac [private] |
Definition at line 50 of file CTimeLogger.h.
| Page generated by Doxygen 1.6.1 for MRPT 0.9.0 SVN: at Mon Jun 7 06:47:58 UTC 2010 |