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 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);
273 #pragma GCC visibility pop
void reset(std::string perf_name)
Definition: stop-watch.cpp:221
std::string error
Definition: stop-watch.hpp:51
Stopwatch & getProfiler()
Definition: stop-watch.cpp:44
long double take_time()
Definition: stop-watch.cpp:71
void set_mode(StopwatchMode mode)
Definition: stop-watch.cpp:61
void stop(std::string perf_name)
Definition: stop-watch.cpp:135
void turn_off()
Definition: stop-watch.cpp:246
bool performance_exists(std::string perf_name)
Definition: stop-watch.cpp:66
void turn_on()
Definition: stop-watch.cpp:240
void report(std::string perf_name, int precision=2, std::ostream &output=std::cout)
Definition: stop-watch.cpp:252
Definition: stop-watch.hpp:47
long double get_min_time(std::string perf_name)
Definition: stop-watch.cpp:316
A class representing a stopwatch.
Definition: stop-watch.hpp:155
long double get_total_time(std::string perf_name)
Definition: stop-watch.cpp:292
Definition: stop-watch.hpp:57
StopwatchMode mode
Definition: stop-watch.hpp:262
long double get_time_so_far(std::string perf_name)
Definition: stop-watch.cpp:277
void reset_all()
Definition: stop-watch.cpp:192
long double get_last_time(std::string perf_name)
Definition: stop-watch.cpp:340
StopwatchMode
Definition: stop-watch.hpp:55
long double get_max_time(std::string perf_name)
Definition: stop-watch.cpp:328
~Stopwatch()
Definition: stop-watch.cpp:56
std::map< std::string, PerformanceData > * records_of
Definition: stop-watch.hpp:266
bool active
Definition: stop-watch.hpp:259
Definition: stop-watch.hpp:59
void start(std::string perf_name)
Definition: stop-watch.cpp:116
StopwatchException(std::string error)
Definition: stop-watch.hpp:50
void report_all(int precision=2, std::ostream &output=std::cout)
Definition: stop-watch.cpp:203
long double get_average_time(std::string perf_name)
Definition: stop-watch.cpp:304
void pause(std::string perf_name)
Definition: stop-watch.cpp:169
Stopwatch(StopwatchMode _mode=NONE)
Definition: stop-watch.cpp:50
Definition: stop-watch.hpp:58