27#ifndef __invdyn_stopwatch_H__ 28#define __invdyn_stopwatch_H__ 34#pragma GCC visibility push(default) 39#define START_PROFILER(name) getProfiler().start(name) 40#define STOP_PROFILER(name) getProfiler().stop(name) 42#define STOP_WATCH_MAX_NAME_LENGTH 60 43#define STOP_WATCH_TIME_WIDTH 10 165 void start(std::string perf_name);
168 void stop(std::string perf_name);
171 void pause(std::string perf_name);
174 void reset(std::string perf_name);
180 void report(std::string perf_name,
int precision = 2,
181 std::ostream& output = std::cout);
184 void report_all(
int precision = 2, std::ostream& output = std::cout);
263#pragma GCC visibility pop A class representing a stopwatch.
Definition stop-watch.hpp:150
long double get_time_so_far(std::string perf_name)
Definition stop-watch.cpp:263
long double take_time()
Definition stop-watch.cpp:60
long double get_min_time(std::string perf_name)
Definition stop-watch.cpp:296
long double get_max_time(std::string perf_name)
Definition stop-watch.cpp:306
void reset(std::string perf_name)
Definition stop-watch.cpp:206
long double get_total_time(std::string perf_name)
Definition stop-watch.cpp:276
void set_mode(StopwatchMode mode)
Definition stop-watch.cpp:54
bool performance_exists(std::string perf_name)
Definition stop-watch.cpp:56
~Stopwatch()
Definition stop-watch.cpp:52
void report_all(int precision=2, std::ostream &output=std::cout)
Definition stop-watch.cpp:182
void turn_on()
Definition stop-watch.cpp:224
std::map< std::string, PerformanceData > * records_of
Definition stop-watch.hpp:257
void start(std::string perf_name)
Definition stop-watch.cpp:102
long double get_average_time(std::string perf_name)
Definition stop-watch.cpp:286
bool active
Definition stop-watch.hpp:250
void pause(std::string perf_name)
Definition stop-watch.cpp:151
void reset_all()
Definition stop-watch.cpp:172
Stopwatch(StopwatchMode _mode=NONE)
Definition stop-watch.cpp:48
void stop(std::string perf_name)
Definition stop-watch.cpp:120
void turn_off()
Definition stop-watch.cpp:229
long double get_last_time(std::string perf_name)
Definition stop-watch.cpp:316
StopwatchMode mode
Definition stop-watch.hpp:253
void report(std::string perf_name, int precision=2, std::ostream &output=std::cout)
Definition stop-watch.cpp:234
StopwatchMode
Definition stop-watch.hpp:52
@ CPU_TIME
Definition stop-watch.hpp:54
@ REAL_TIME
Definition stop-watch.hpp:55
@ NONE
Definition stop-watch.hpp:53
Stopwatch & getProfiler()
Definition stop-watch.cpp:43
StopwatchException(std::string error)
Definition stop-watch.hpp:48
std::string error
Definition stop-watch.hpp:49