28 #ifndef RBPRM_PROFILER_H 29 #define RBPRM_PROFILER_H 44 std::map<std::string, int>::iterator it = count_.find(event);
45 if(it == count_.end())
47 count_.insert(std::make_pair(event,nbOcc));
58 for(std::map<std::string, int>::iterator it = count_.begin();
59 it != count_.end(); ++it)
61 output << it->first <<
": " << it->second << std::endl;
73 std::map<std::string, int> count_;
void report_all_and_count(int precision=2, std::ostream &output=std::cout)
Definition: rbprm-profiler.hh:65
Definition: rbprm-profiler.hh:33
~RbPrmProfiler()
Definition: rbprm-profiler.hh:40
StopwatchMode
Definition: stop-watch.hh:47
A class representing a stopwatch.
Definition: stop-watch.hh:146
Definition: stop-watch.hh:49
void add_to_count(const std::string &event, int nbOcc=1)
Definition: rbprm-profiler.hh:42
RbPrmProfiler(StopwatchMode _mode=NONE)
Definition: rbprm-profiler.hh:37
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:56