DABC (Data Acquisition Backbone Core)  2.9.9
Data Structures | Public Member Functions | Static Public Member Functions | Protected Attributes
dabc::CpuStatistic Class Reference

Helper class to get CPU statistic. More...

#include <dabc/statistic.h>

Data Structures

struct  SingleCpu
 

Public Member Functions

 CpuStatistic (bool withmem=false)
 
double CPUutil (unsigned n=0) const
 
long unsigned GetNumThreads () const
 
long unsigned GetVmPeak () const
 
long unsigned GetVmSize () const
 
bool Measure ()
 
unsigned NumCPUs () const
 
bool Reset ()
 
double SysUtil (unsigned n=0) const
 
double UserUtil (unsigned n=0) const
 
virtual ~CpuStatistic ()
 

Static Public Member Functions

static long GetProcVirtMem ()
 

Protected Attributes

std::vector< SingleCpufCPUs
 
long unsigned fNumThreads
 
FILE * fProcStatFp
 
FILE * fStatFp
 
long unsigned fVmPeak
 
long unsigned fVmSize
 

Detailed Description

Helper class to get CPU statistic.

Definition at line 33 of file statistic.h.

Constructor & Destructor Documentation

◆ CpuStatistic()

dabc::CpuStatistic::CpuStatistic ( bool  withmem = false)

Definition at line 25 of file statistic.cxx.

◆ ~CpuStatistic()

dabc::CpuStatistic::~CpuStatistic ( )
virtual

Definition at line 54 of file statistic.cxx.

Member Function Documentation

◆ Measure()

bool dabc::CpuStatistic::Measure ( )

Definition at line 65 of file statistic.cxx.

◆ Reset()

bool dabc::CpuStatistic::Reset ( )

Definition at line 145 of file statistic.cxx.

◆ NumCPUs()

unsigned dabc::CpuStatistic::NumCPUs ( ) const
inline

Definition at line 56 of file statistic.h.

◆ CPUutil()

double dabc::CpuStatistic::CPUutil ( unsigned  n = 0) const
inline

Definition at line 58 of file statistic.h.

◆ UserUtil()

double dabc::CpuStatistic::UserUtil ( unsigned  n = 0) const
inline

Definition at line 59 of file statistic.h.

◆ SysUtil()

double dabc::CpuStatistic::SysUtil ( unsigned  n = 0) const
inline

Definition at line 60 of file statistic.h.

◆ GetVmSize()

long unsigned dabc::CpuStatistic::GetVmSize ( ) const
inline

Definition at line 62 of file statistic.h.

◆ GetVmPeak()

long unsigned dabc::CpuStatistic::GetVmPeak ( ) const
inline

Definition at line 63 of file statistic.h.

◆ GetNumThreads()

long unsigned dabc::CpuStatistic::GetNumThreads ( ) const
inline

Definition at line 64 of file statistic.h.

◆ GetProcVirtMem()

long dabc::CpuStatistic::GetProcVirtMem ( )
static

Definition at line 151 of file statistic.cxx.

Field Documentation

◆ fStatFp

FILE* dabc::CpuStatistic::fStatFp
protected

Definition at line 41 of file statistic.h.

◆ fProcStatFp

FILE* dabc::CpuStatistic::fProcStatFp
protected

Definition at line 42 of file statistic.h.

◆ fCPUs

std::vector<SingleCpu> dabc::CpuStatistic::fCPUs
protected

Definition at line 43 of file statistic.h.

◆ fVmSize

long unsigned dabc::CpuStatistic::fVmSize
protected

Definition at line 45 of file statistic.h.

◆ fVmPeak

long unsigned dabc::CpuStatistic::fVmPeak
protected

Definition at line 46 of file statistic.h.

◆ fNumThreads

long unsigned dabc::CpuStatistic::fNumThreads
protected

Definition at line 47 of file statistic.h.


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