Flow123d
jenkins-Flow123d-linux-release-multijob-282
|
Go to the source code of this file.
Classes | |
class | MPI_Functions |
class | Profiler |
Macros | |
#define | CONSTEXPR_ |
#define | _PASTE(a, b) a ## b |
#define | PASTE(a, b) _PASTE(a, b) |
#define | START_TIMER(tag) |
Starts a timer with specified tag. More... | |
#define | END_TIMER(tag) |
Ends a timer with specified tag. More... | |
#define | END_START_TIMER(tag) |
#define | ADD_CALLS(n_calls) |
Increase number of calls in actual timer. More... | |
#define _PASTE | ( | a, | |
b | |||
) | a ## b |
Definition at line 91 of file sys_profiler.hh.
#define ADD_CALLS | ( | n_calls | ) |
Increase number of calls in actual timer.
Some time you want to measure a performance of a cycle with body that is below resolution of the Timer implementation. If you know number of cycles, you can use this macro in following way:
In the profiler report you get the total time spent in the cycle, and time per one call which will be average time spent in the body of the cycle.
Definition at line 164 of file sys_profiler.hh.
#define CONSTEXPR_ |
Definition at line 83 of file sys_profiler.hh.
#define END_START_TIMER | ( | tag | ) |
Ends current timer and starts the new one with given tag. Again this expands into two lines, see ATTENTION in previous macro.
Definition at line 138 of file sys_profiler.hh.
#define END_TIMER | ( | tag | ) |
Ends a timer with specified tag.
Use only if you want to end timer before the end of block. Again this expands into two lines, see ATTENTION in previous macro.
Definition at line 127 of file sys_profiler.hh.
#define PASTE | ( | a, | |
b | |||
) | _PASTE(a, b) |
Definition at line 92 of file sys_profiler.hh.
#define START_TIMER | ( | tag | ) |
Starts a timer with specified tag.
In fact it creates an static constant expression that identifies the point in the code and contains tag of the involved timer and its hash. Then it creates local variable that calls Profiler::start_timer()
in constructor and Profiler::stop_timer()
in destructor. This way the timer is automatically closed at the end of current block.
ATTENTION: This macro expands to two statements so following code is illegal:
Definition at line 114 of file sys_profiler.hh.