Belle II Software development
ProfileInfo.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <framework/dataobjects/ProfileInfo.h>
10
11#include <framework/utilities/Utils.h>
12#include <framework/gearbox/Unit.h>
13
14using namespace Belle2;
15
16void ProfileInfo::set(double timeOffset)
17{
20
21 m_timeInSec = Utils::getClock() / Unit::s - timeOffset;
22}
double m_timeInSec
Time used by this process in seconds.
Definition: ProfileInfo.h:75
void set(double timeOffset=0)
Obtain the current profile values.
Definition: ProfileInfo.cc:16
unsigned long m_rssMemory
Resident Memory size in kB.
Definition: ProfileInfo.h:71
unsigned long m_virtualMemory
Virtual Memory size in kB.
Definition: ProfileInfo.h:67
static const double s
[second]
Definition: Unit.h:95
double getClock()
Return current value of the real-time clock.
Definition: Utils.cc:66
unsigned long getRssMemoryKB()
Returns the amount of memory the process actually occupies in the physical RAM of the machine.
Definition: Utils.cc:84
unsigned long getVirtualMemoryKB()
Returns currently used virtual memory in KB, includes swapped and not occupied memory pages and memor...
Definition: Utils.cc:79
Abstract base class for different kinds of events.