Definition at line 23 of file CTimeLogger.cpp.
Public Member Functions | |
MyGlobalProfiler () | |
~MyGlobalProfiler () | |
std::string | getStatsAsText (const size_t column_width=80) const |
Dump all stats to a multi-line text string. More... | |
void | getStats (std::map< std::string, TCallStats > &out_stats) const |
Returns all the current stats as a map: section_name => stats. More... | |
void | dumpAllStats (const size_t column_width=80) const |
Dump all stats through the COutputLogger interface. More... | |
void | clear (bool deep_clear=false) |
Resets all stats. By default (deep_clear=false), all section names are remembered (not freed) so the cost of creating upon the first next call is avoided. More... | |
void | enable (bool enabled=true) |
void | disable () |
bool | isEnabled () const |
void | saveToCSVFile (const std::string &csv_file) const |
Dump all stats to a Comma Separated Values (CSV) file. More... | |
void | registerUserMeasure (const char *event_name, const double value) |
void | setName (const std::string &name) |
void | enter (const char *func_name) |
Start of a named section. More... | |
double | leave (const char *func_name) |
End of a named section. More... | |
double | getMeanTime (const std::string &name) const |
Return the mean execution time of the given "section", or 0 if it hasn't ever been called "enter" with that section name. More... | |
double | getLastTime (const std::string &name) const |
Return the last execution time of the given "section", or 0 if it hasn't ever been called "enter" with that section name. More... | |
Protected Types | |
typedef mrpt::utils::ts_hash_map< std::string, TCallData, 1, 10 > | TDataMap |
Protected Member Functions | |
void | do_enter (const char *func_name) |
double | do_leave (const char *func_name) |
Protected Attributes | |
TDataMap | m_data |
|
protectedinherited |
Definition at line 59 of file CTimeLogger.h.
|
inline |
Definition at line 25 of file CTimeLogger.cpp.
|
inline |
Definition at line 28 of file CTimeLogger.cpp.
|
inherited |
Resets all stats. By default (deep_clear=false), all section names are remembered (not freed) so the cost of creating upon the first next call is avoided.
Definition at line 107 of file CTimeLogger.cpp.
References mrpt::utils::CTimeLogger::m_data.
|
inlineinherited |
|
protectedinherited |
Definition at line 217 of file CTimeLogger.cpp.
References mrpt::utils::CTimeLogger::m_data, mrpt::utils::CTimeLogger::m_tictac, mrpt::utils::CTimeLogger::TCallData::n_calls, mrpt::utils::CTimeLogger::TCallData::open_calls, and mrpt::utils::CTicTac::Tac().
|
protectedinherited |
Definition at line 227 of file CTimeLogger.cpp.
References mrpt::mrpt::utils::keep_max(), mrpt::mrpt::utils::keep_min(), mrpt::utils::CTimeLogger::TCallData::last_t, mrpt::utils::CTimeLogger::m_data, mrpt::utils::CTimeLogger::m_tictac, mrpt::utils::CTimeLogger::TCallData::max_t, mrpt::utils::CTimeLogger::TCallData::mean_t, mrpt::utils::CTimeLogger::TCallData::min_t, mrpt::utils::CTimeLogger::TCallData::n_calls, mrpt::utils::CTimeLogger::TCallData::open_calls, and mrpt::utils::CTicTac::Tac().
|
inherited |
Dump all stats through the COutputLogger interface.
Definition at line 212 of file CTimeLogger.cpp.
References mrpt::utils::CTimeLogger::getStatsAsText(), and MRPT_LOG_INFO_STREAM.
Referenced by mrpt::utils::CTimeLogger::~CTimeLogger().
|
inlineinherited |
Definition at line 88 of file CTimeLogger.h.
Referenced by mrpt::detectors::CFaceDetection::CFaceDetection(), mrpt::nav::CAbstractNavigator::loadConfigFile(), and mrpt::graphs::ScalarFactorGraph::updateEstimation().
|
inlineinherited |
Start of a named section.
Definition at line 97 of file CTimeLogger.h.
Referenced by mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::_optimizeGraph(), mrpt::bayes::detail::addNewLandmarks(), mrpt::vision::bundle_adj_full(), mrpt::utils::CImage::changeSize(), mrpt::detectors::CFaceDetection::checkIfDiagonalSurface(), mrpt::detectors::CFaceDetection::checkIfDiagonalSurface2(), mrpt::detectors::CFaceDetection::checkIfFacePlaneCov(), mrpt::detectors::CFaceDetection::checkIfFaceRegions(), mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::checkRegistrationCondition2D(), mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::checkRegistrationCondition3D(), mrpt::utils::CTimeLoggerEntry::CTimeLoggerEntry(), mrpt::detectors::CFaceDetection::detectObjects_Impl(), mrpt::mrpt::utils::global_profiler_enter(), mrpt::nav::CReactiveNavigationSystem3D::implementSenseObstacles(), mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::initializeVisuals(), mrpt::opengl::CTexturedObject::loadTextureInOpenGL(), mrpt::graphslam::optimize_graph_spa_levmarq(), mrpt::tfest::se2_l2_robust(), mrpt::nav::CAbstractPTGBasedReactive::STEP8_GenerateLogRecord(), mrpt::graphs::ScalarFactorGraph::updateEstimation(), mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::updateState(), and mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::updateVisuals().
|
inherited |
Return the last execution time of the given "section", or 0 if it hasn't ever been called "enter" with that section name.
Definition at line 294 of file CTimeLogger.cpp.
References mrpt::utils::CTimeLogger::m_data.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), and mrpt::nav::CAbstractPTGBasedReactive::STEP8_GenerateLogRecord().
|
inherited |
Return the mean execution time of the given "section", or 0 if it hasn't ever been called "enter" with that section name.
Definition at line 287 of file CTimeLogger.cpp.
References mrpt::utils::CTimeLogger::m_data.
|
inherited |
Returns all the current stats as a map: section_name => stats.
Definition at line 131 of file CTimeLogger.cpp.
References mrpt::utils::CTimeLogger::TCallStats::last_t, mrpt::utils::CTimeLogger::m_data, mrpt::utils::CTimeLogger::TCallStats::max_t, mrpt::utils::CTimeLogger::TCallStats::mean_t, mrpt::utils::CTimeLogger::TCallStats::min_t, mrpt::utils::CTimeLogger::TCallStats::n_calls, and mrpt::utils::CTimeLogger::TCallStats::total_t.
|
inherited |
Dump all stats to a multi-line text string.
Definition at line 146 of file CTimeLogger.cpp.
References aux_format_string_multilines(), mrpt::format(), mrpt::utils::CTimeLogger::m_data, mrpt::utils::CTimeLogger::m_name, and mrpt::system::unitsFormat().
Referenced by mrpt::utils::CTimeLogger::dumpAllStats(), mrpt::detectors::CFaceDetection::experimental_showMeasurements(), mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::getDescriptiveReport(), mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::getDescriptiveReport(), and mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::getDescriptiveReport().
|
inlineinherited |
Definition at line 90 of file CTimeLogger.h.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), and mrpt::nav::CAbstractNavigator::loadConfigFile().
|
inlineinherited |
End of a named section.
Definition at line 102 of file CTimeLogger.h.
Referenced by mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::_optimizeGraph(), mrpt::vision::bundle_adj_full(), mrpt::utils::CImage::changeSize(), mrpt::detectors::CFaceDetection::checkIfDiagonalSurface(), mrpt::detectors::CFaceDetection::checkIfDiagonalSurface2(), mrpt::detectors::CFaceDetection::checkIfFacePlaneCov(), mrpt::detectors::CFaceDetection::checkIfFaceRegions(), mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::checkRegistrationCondition2D(), mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::checkRegistrationCondition3D(), mrpt::detectors::CFaceDetection::detectObjects_Impl(), mrpt::mrpt::utils::global_profiler_leave(), mrpt::nav::CReactiveNavigationSystem3D::implementSenseObstacles(), mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::initializeVisuals(), mrpt::opengl::CTexturedObject::loadTextureInOpenGL(), mrpt::graphslam::optimize_graph_spa_levmarq(), mrpt::tfest::se2_l2_robust(), mrpt::nav::CAbstractPTGBasedReactive::STEP8_GenerateLogRecord(), mrpt::graphs::ScalarFactorGraph::updateEstimation(), mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::updateState(), mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::updateVisuals(), and mrpt::utils::CTimeLoggerEntry::~CTimeLoggerEntry().
|
inherited |
Definition at line 256 of file CTimeLogger.cpp.
References mrpt::utils::CTimeLogger::TCallData::has_time_units, mrpt::mrpt::utils::keep_max(), mrpt::mrpt::utils::keep_min(), mrpt::utils::CTimeLogger::TCallData::last_t, mrpt::utils::CTimeLogger::m_data, mrpt::utils::CTimeLogger::m_enabled, mrpt::utils::CTimeLogger::TCallData::max_t, mrpt::utils::CTimeLogger::TCallData::mean_t, mrpt::utils::CTimeLogger::TCallData::min_t, and mrpt::utils::CTimeLogger::TCallData::n_calls.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate().
|
inherited |
Dump all stats to a Comma Separated Values (CSV) file.
Definition at line 194 of file CTimeLogger.cpp.
References mrpt::format(), mrpt::utils::CTimeLogger::m_data, and mrpt::utils::CStream::printf().
|
inlineinherited |
Definition at line 94 of file CTimeLogger.h.
|
protectedinherited |
Definition at line 60 of file CTimeLogger.h.
Referenced by mrpt::utils::CTimeLogger::clear(), mrpt::utils::CTimeLogger::do_enter(), mrpt::utils::CTimeLogger::do_leave(), mrpt::utils::CTimeLogger::getLastTime(), mrpt::utils::CTimeLogger::getMeanTime(), mrpt::utils::CTimeLogger::getStats(), mrpt::utils::CTimeLogger::getStatsAsText(), mrpt::utils::CTimeLogger::operator=(), mrpt::utils::CTimeLogger::registerUserMeasure(), mrpt::utils::CTimeLogger::saveToCSVFile(), and mrpt::utils::CTimeLogger::~CTimeLogger().
Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020 |