109 bool writeCounts=
true,
124 static char acBuf[100];
126 sprintf(acBuf,
"%3ld.%1ld s",l/1000000,l/100000-10*(l/1000000));
128 sprintf(acBuf,
"%3ld.%1ld ms",l/1000,l/100-10*(l/1000));
130 sprintf(acBuf,
" %3ld us",l);
132 return std::string(acBuf);
191 #define BENCHMARK_THIS_SECTION(SECTION_NAME) \ 192 static icl::utils::StackTimer::StackTimerNotifier __notifier(#SECTION_NAME); \ 193 icl::utils::StackTimer __stacktimer(&__notifier); 195 #define BENCHMARK_THIS_FUNCTION \ 196 static icl::utils::StackTimer::StackTimerNotifier __notifier(__FUNCTION__); \ 197 icl::utils::StackTimer __stacktimer(&__notifier); 199 #define BENCHMARK_THIS_FUNCTION_LITE \ 200 static icl::utils::StackTimer::StackTimerNotifier __notifier(__FUNCTION__,0,0,0,0); \ 201 icl::utils::StackTimer __stacktimer(&__notifier); long int m_liTime
Definition: StackTimer.h:163
void start()
alias for startTimer
Definition: Timer.h:70
undocument this line if you encounter any issues!
Definition: Any.h:37
void incTime(long int dt)
adds execution time, USE BENCHMARK_THIS_FUNCTION-MACRO instead
Definition: StackTimer.h:156
StackTimer(StackTimerNotifier *notifier)
StackTimer constructor, USE BENCHMARK_THIS_FUNCTION-MACRO instead.
Definition: StackTimer.h:174
bool m_bWriteAvg
Definition: StackTimer.h:169
#define iclMin(A, B)
Definition: Macros.h:204
Timer * m_poTimer
Definition: StackTimer.h:186
Tool for benchmarking method calls.
Definition: StackTimer.h:103
long int m_liMinTime
Definition: StackTimer.h:165
void incCount()
increments the execution counter, USE BENCHMARK_THIS_FUNCTION-MACRO instead
Definition: StackTimer.h:152
long int m_liCount
Definition: StackTimer.h:162
~StackTimer()
StackTimerNotifier destructor, USE BENCHMARK_THIS_FUNCTION-MACRO instead.
Definition: StackTimer.h:181
std::string m_sFunctionName
Definition: StackTimer.h:166
long int m_liMaxTime
Definition: StackTimer.h:164
bool m_bWriteCounts
Definition: StackTimer.h:168
#define iclMax(A, B)
Definition: Macros.h:207
StackTimerNotifier constructor, USE BENCHMARK_THIS_FUNCTION-MACRO instead.
Definition: StackTimer.h:106
~StackTimerNotifier()
StackTimerNotifier destructor, USE BENCHMARK_THIS_FUNCTION-MACRO instead.
Definition: StackTimer.h:135
long int stopSilent()
stops the timer and returns the overall working time as long int
StackTimerNotifier * m_poNotifier
Definition: StackTimer.h:187
bool m_bWriteMin
Definition: StackTimer.h:170
bool m_bWriteMax
Definition: StackTimer.h:171
std::string getTimeStr(long int l)
Definition: StackTimer.h:123
StackTimerNotifier(const char *functionname, bool writeCounts=true, bool writeAvg=true, bool writeMin=true, bool writeMax=true)
Definition: StackTimer.h:108