std::basic_string< CepsChar > CepsString
C++ format string.
std::map< _Key, _Tp, _Compare, _Alloc > CepsMap
C++ map.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
A Chronometer used to measure execution of blocks of code, plus some methods to get current memory us...
void stop(CepsString lbl)
Stops the measure of a labeled chronometer.
CepsMap< CepsString, clock_t > m_tmpTimes
Temp evals for times.
size_t localMemoryUsage()
Returns an estimation of the memory taken by the current process (in kB)
CepsMap< CepsString, CepsReal > m_seconds
Times.
void start(CepsString lbl, CepsString dspl="")
Creates or continue a labeled chronometer.
CepsUInt m_maxLen
For nice output.
Profiler(const Profiler &)=delete
Copy constructor deleted, ideally, there should be one profiler per run.
CepsMap< CepsString, CepsString > m_dsplStrs
Text to display at the end of computation, typically.
void logMemoryUsage(const CepsString &xtic)
Writes a line with memory usage in profiling log, xtic is used to describe what the program is curren...
void display() const
Prints time spent by all chronometers.
Profiler & operator=(const Profiler &)=delete
Assignment operator deleted, ideally, there should be one profiler per run.
size_t globalMemoryUsage()
Returns an estimation of the memory taken by all the MPI process (in kB)
void restart(CepsString lbl)
Resets a labeled chronometer.
void logMemoryUsageIf(CepsBool ifexpr, const CepsString &xtic)
Writes a line with memory usage in profiling log if 'ifexpr' is true, xtic is used to describe what t...