Go to the documentation of this file.
14 currentStarts.clear();
20 currentStarts[tag] = Clock::now();
27 auto it = currentStarts.find(tag);
28 if (it == currentStarts.end())
36 Stats& stats = statsMap[tag];
52 os <<
"Total execution time: " << stats.
totalExecutionTime.count() <<
" seconds" << std::endl;
53 os <<
"Total number of executions: " << stats.
numExecutions << std::endl;
54 os <<
"Average execution time: " << stats.
averageExecutionTime.count() <<
" seconds" << std::endl;
60 for (
auto it : stats.statsMap)
62 os <<
"== Stats for '" << it.first <<
"' ==" << std::endl;
std::chrono::time_point< Clock > TimePoint
Duration latestExecutionTime
std::size_t numExecutions
Duration totalExecutionTime
const Stats & getStats(const std::string &tag)
void stop(const std::string &tag)
std::chrono::duration< float > Duration
std::ostream & operator<<(std::ostream &os, const Stats &stats)
Duration averageExecutionTime
void start(const std::string &tag)