-
Studer Gabriel authoredStuder Gabriel authored
Runtime profiling
Defines functionality for runtime profiling.
All profiling is completely turned off by default and must be activated at
compile-time by adding -DPM3_RUNTIME_PROFILING_LEVEL=N
to your |cmake|
call, where N
must be larger than 0. If turned off, all these functions
will still exist and work but will not do anything. Functionality in the |C++|
code is usually profiled at level 2, while |python| functionality is profiled
at level 1. The default profiling only covers the steps of the modelling
pipeline.
You can start multiple timers with the same id and statistics will be generated considering the number of timings and the total runtime for that timer. If a timer within another timed entity, the outer timer is paused, while the inner one is running. Hence, the sum of all timers will be the total time spent in any timer (nothing is counted twice!).