11#include <OpenMS/config.h>
66 size_t mem_before, mem_before_peak,
mem_after, mem_after_peak;
A more convenient string class.
Definition String.h:34
Some functions to get system information.
Definition SysInfo.h:27
static bool getProcessMemoryConsumption(size_t &mem_virtual)
static Int64 getProcessId()
static bool getProcessPeakMemoryConsumption(size_t &mem_virtual)
int64_t Int64
Signed integer type (64bit)
Definition Types.h:40
uint64_t UInt64
Unsigned integer type (64bit)
Definition Types.h:47
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
std::string bytesToHumanReadable(UInt64 bytes)
convert bytes to a human readable unit (TiB, GiB, MiB, KiB), e.g. "45.34 MiB"
A convenience class to report either absolute or delta (between two timepoints) RAM usage.
Definition SysInfo.h:65
String delta(const String &event="delta")
void before()
record data for the first timepoint
void after()
record data for the second timepoint
size_t mem_after
Definition SysInfo.h:66
MemUsage()
C'tor, calls before() automatically.
String diff_str_(size_t mem_before, size_t mem_after)
void reset()
forget all data (you need to call before() again)