28 #ifndef __invdyn_stopwatch_H__ 29 #define __invdyn_stopwatch_H__ 35 #pragma GCC visibility push(default) 40 #define START_PROFILER(name) getProfiler().start(name) 41 #define STOP_PROFILER(name) getProfiler().stop(name) 43 #define STOP_WATCH_MAX_NAME_LENGTH 60 44 #define STOP_WATCH_TIME_WIDTH 10 165 bool performance_exists(std::string perf_name);
171 void start(std::string perf_name);
174 void stop(std::string perf_name);
177 void pause(std::string perf_name);
180 void reset(std::string perf_name);
186 void report(std::string perf_name,
int precision=2,
187 std::ostream& output = std::cout);
190 void report_all(
int precision=2, std::ostream& output = std::cout);
193 long double get_total_time(std::string perf_name);
196 long double get_average_time(std::string perf_name);
199 long double get_min_time(std::string perf_name);
202 long double get_max_time(std::string perf_name);
205 long double get_last_time(std::string perf_name);
209 long double get_time_so_far(std::string perf_name);
219 long double take_time();
273 #pragma GCC visibility pop
std::string error
Definition: stop-watch.hpp:51
Stopwatch & getProfiler()
Definition: stop-watch.cpp:44
Definition: stop-watch.hpp:47
A class representing a stopwatch.
Definition: stop-watch.hpp:155
Definition: stop-watch.hpp:57
StopwatchMode mode
Definition: stop-watch.hpp:262
StopwatchMode
Definition: stop-watch.hpp:55
std::map< std::string, PerformanceData > * records_of
Definition: stop-watch.hpp:266
bool active
Definition: stop-watch.hpp:259
Definition: stop-watch.hpp:59
StopwatchException(std::string error)
Definition: stop-watch.hpp:50
Definition: stop-watch.hpp:58