27 #ifndef RBPRM_PROFILER_H 28 #define RBPRM_PROFILER_H 41 std::map<std::string, int>::iterator it = count_.find(event);
42 if (it == count_.end()) {
43 count_.insert(std::make_pair(event, nbOcc));
50 for (std::map<std::string, int>::iterator it = count_.begin(); it != count_.end(); ++it) {
51 output << it->first <<
": " << it->second << std::endl;
61 std::map<std::string, int> count_;
void report_all_and_count(int precision=2, std::ostream &output=std::cout)
Definition: rbprm-profiler.hh:55
Definition: rbprm-profiler.hh:32
~RbPrmProfiler()
Definition: rbprm-profiler.hh:38
StopwatchMode
Definition: stop-watch.hh:44
A class representing a stopwatch.
Definition: stop-watch.hh:142
Definition: stop-watch.hh:45
void add_to_count(const std::string &event, int nbOcc=1)
Definition: rbprm-profiler.hh:40
RbPrmProfiler(StopwatchMode _mode=NONE)
Definition: rbprm-profiler.hh:35
RbPrmProfiler & getRbPrmProfiler()
void report_all(int precision=2, std::ostream &output=std::cout)
void report_count(std::ostream &output=std::cout)
Definition: rbprm-profiler.hh:49