Belle II Software light-2406-ragdoll
ProfileInfo Class Reference

Store execution time and memory usage. More...

#include <ProfileInfo.h>

Inheritance diagram for ProfileInfo:
Collaboration diagram for ProfileInfo:

Public Member Functions

 ProfileInfo (unsigned long virtualMemory=0, unsigned long rssMemory=0, double timeInSec=0)
 Constructor.
 
void set (double timeOffset=0)
 Obtain the current profile values.
 
unsigned long getVirtualMemory () const
 Virtual Memory size getter.
 
unsigned long getRssMemory () const
 Rss Memory size getter.
 
double getTimeInSec () const
 Time getter.
 

Private Member Functions

 ClassDef (ProfileInfo, 2)
 Store execution time and memory usage.
 

Private Attributes

unsigned long m_virtualMemory
 Virtual Memory size in kB.
 
unsigned long m_rssMemory
 Resident Memory size in kB.
 
double m_timeInSec
 Time used by this process in seconds.
 

Detailed Description

Store execution time and memory usage.

Class for execution time and memory usage information.

Definition at line 22 of file ProfileInfo.h.

Constructor & Destructor Documentation

◆ ProfileInfo()

ProfileInfo ( unsigned long  virtualMemory = 0,
unsigned long  rssMemory = 0,
double  timeInSec = 0 
)
inline

Constructor.

Initializes meta data of event with Nulls.

Definition at line 29 of file ProfileInfo.h.

30 : m_virtualMemory(virtualMemory), m_rssMemory(rssMemory), m_timeInSec(timeInSec) {}
double m_timeInSec
Time used by this process in seconds.
Definition: ProfileInfo.h:75
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

Member Function Documentation

◆ getRssMemory()

unsigned long getRssMemory ( ) const
inline

Rss Memory size getter.

Returns
The Rss memory size in kB.

Definition at line 49 of file ProfileInfo.h.

50 {
51 return m_rssMemory;
52 }

◆ getTimeInSec()

double getTimeInSec ( ) const
inline

Time getter.

Returns
The time in seconds.

Definition at line 58 of file ProfileInfo.h.

59 {
60 return m_timeInSec;
61 }

◆ getVirtualMemory()

unsigned long getVirtualMemory ( ) const
inline

Virtual Memory size getter.

Returns
The virtual memory size in kB.

Definition at line 40 of file ProfileInfo.h.

41 {
42 return m_virtualMemory;
43 }

◆ set()

void set ( double  timeOffset = 0)

Obtain the current profile values.

Definition at line 16 of file ProfileInfo.cc.

17{
20
21 m_timeInSec = Utils::getClock() / Unit::s - timeOffset;
22}
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

Member Data Documentation

◆ m_rssMemory

unsigned long m_rssMemory
private

Resident Memory size in kB.

Definition at line 71 of file ProfileInfo.h.

◆ m_timeInSec

double m_timeInSec
private

Time used by this process in seconds.

Definition at line 75 of file ProfileInfo.h.

◆ m_virtualMemory

unsigned long m_virtualMemory
private

Virtual Memory size in kB.

Definition at line 67 of file ProfileInfo.h.


The documentation for this class was generated from the following files: