27 #ifndef __sot_core_stopwatch_H__
28 #define __sot_core_stopwatch_H__
37 #pragma GCC visibility push(default)
54 #define STOP_WATCH_MAX_NAME_LENGTH 80
165 void stop(std::string perf_name);
177 void report(std::string perf_name,
int precision = 2,
178 std::ostream &output = std::cout);
181 void report_all(
int precision = 2, std::ostream &output = std::cout);
260 #pragma GCC visibility pop
A class representing a stopwatch.
Definition: stop-watch.hh:147
long double get_time_so_far(std::string perf_name)
long double get_min_time(std::string perf_name)
long double get_max_time(std::string perf_name)
void reset(std::string perf_name)
long double get_total_time(std::string perf_name)
void set_mode(StopwatchMode mode)
bool performance_exists(std::string perf_name)
void report_all(int precision=2, std::ostream &output=std::cout)
std::map< std::string, PerformanceData > * records_of
Definition: stop-watch.hh:254
void start(std::string perf_name)
long double get_average_time(std::string perf_name)
bool active
Definition: stop-watch.hh:247
void pause(std::string perf_name)
Stopwatch(StopwatchMode _mode=NONE)
void stop(std::string perf_name)
long double get_last_time(std::string perf_name)
StopwatchMode mode
Definition: stop-watch.hh:250
void report(std::string perf_name, int precision=2, std::ostream &output=std::cout)
Stopwatch & getProfiler()
StopwatchMode
Definition: stop-watch.hh:47
@ CPU_TIME
Definition: stop-watch.hh:49
@ REAL_TIME
Definition: stop-watch.hh:50
@ NONE
Definition: stop-watch.hh:48
Definition: stop-watch.hh:41
StopwatchException(std::string error)
Definition: stop-watch.hh:43
std::string error
Definition: stop-watch.hh:44