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();
51 it != count_.end(); ++it) {
52 output << it->first <<
": " << it->second << std::endl;
57 std::ostream& output = std::cout) {
63 std::map<std::string, int> count_;
Definition: rbprm-profiler.hh:32
void add_to_count(const std::string &event, int nbOcc=1)
Definition: rbprm-profiler.hh:40
void report_count(std::ostream &output=std::cout)
Definition: rbprm-profiler.hh:49
RbPrmProfiler(StopwatchMode _mode=NONE)
Definition: rbprm-profiler.hh:35
void report_all_and_count(int precision=2, std::ostream &output=std::cout)
Definition: rbprm-profiler.hh:56
~RbPrmProfiler()
Definition: rbprm-profiler.hh:38
A class representing a stopwatch.
Definition: stop-watch.hh:142
void report_all(int precision=2, std::ostream &output=std::cout)
RbPrmProfiler & getRbPrmProfiler()
StopwatchMode
Definition: stop-watch.hh:44
@ NONE
Definition: stop-watch.hh:45