CbmRoot
|
Track the memory usage of the process and write it to the log. More...
#include <MemoryLogger.h>
Public Member Functions | |
MemoryLogger ()=default | |
Constructor. | |
~MemoryLogger ()=default | |
Destructor. | |
void | Log () |
Log the current memory usage. | |
Private Member Functions | |
template<typename T > | |
T | BytesToMB (T bytes) const |
Private Attributes | |
size_t | mLastRSS = 0 |
Track the memory usage of the process and write it to the log.
Definition at line 20 of file MemoryLogger.h.
|
default |
Constructor.
|
default |
Destructor.
|
private |
Definition at line 13 of file MemoryLogger.cxx.
Referenced by Log().
void MemoryLogger::Log | ( | ) |
Log the current memory usage.
Definition at line 18 of file MemoryLogger.cxx.
References BytesToMB(), cbm::algo::GetCurrentRSS(), cbm::algo::GetPeakRSS(), L_, and mLastRSS.
Referenced by main().
|
private |
Definition at line 39 of file MemoryLogger.h.
Referenced by Log().