Belle II Software  release-08-01-10
ProfileInfo.h
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 #pragma once
10 
11 #include <TObject.h>
12 
13 namespace Belle2 {
22  class ProfileInfo : public TObject {
23  public:
24 
29  ProfileInfo(unsigned long virtualMemory = 0, unsigned long rssMemory = 0, double timeInSec = 0)
30  : m_virtualMemory(virtualMemory), m_rssMemory(rssMemory), m_timeInSec(timeInSec) {}
31 
34  void set(double timeOffset = 0);
35 
40  unsigned long getVirtualMemory() const
41  {
42  return m_virtualMemory;
43  }
44 
49  unsigned long getRssMemory() const
50  {
51  return m_rssMemory;
52  }
53 
58  double getTimeInSec() const
59  {
60  return m_timeInSec;
61  }
62 
63  private:
64 
67  unsigned long m_virtualMemory;
68 
71  unsigned long m_rssMemory;
72 
75  double m_timeInSec;
76 
79  }; //class
81 } // namespace Belle2
Store execution time and memory usage.
Definition: ProfileInfo.h:22
double getTimeInSec() const
Time getter.
Definition: ProfileInfo.h:58
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 getVirtualMemory() const
Virtual Memory size getter.
Definition: ProfileInfo.h:40
ProfileInfo(unsigned long virtualMemory=0, unsigned long rssMemory=0, double timeInSec=0)
Constructor.
Definition: ProfileInfo.h:29
ClassDef(ProfileInfo, 2)
Store execution time and memory usage.
unsigned long m_rssMemory
Resident Memory size in kB.
Definition: ProfileInfo.h:71
unsigned long getRssMemory() const
Rss Memory size getter.
Definition: ProfileInfo.h:49
unsigned long m_virtualMemory
Virtual Memory size in kB.
Definition: ProfileInfo.h:67
Abstract base class for different kinds of events.