Version: 9.15.0
counters Class Reference

#include <chrono.hxx>

Collaboration diagram for counters:

Public Member Functions

 counters (int nb)
 
 ~counters ()
 
void stats ()
 

Static Public Attributes

static cntStruct_ctrs = 0
 

Protected Attributes

int _nbChrono
 

Detailed Description

Definition at line 42 of file chrono.hxx.

Constructor & Destructor Documentation

◆ counters()

counters::counters ( int  nb)

Definition at line 29 of file chrono.cxx.

30 {
31  DEBTRACE("counters::counters(int nb)");
32  _nbChrono = nb;
33  _ctrs = new cntStruct[_nbChrono];
34 
35  for (int i=0; i< _nbChrono; i++)
36  {
37  _ctrs[i]._ctrNames = 0;
38  _ctrs[i]._ctrLines = 0;
39  _ctrs[i]._ctrOccur = 0;
40  _ctrs[i]._ctrCumul = 0;
41  }
42 
43  DEBTRACE("counters::counters()");
44 }
#define DEBTRACE(msg)
Definition: YacsTrace.hxx:31
static cntStruct * _ctrs
Definition: chrono.hxx:45
int _nbChrono
Definition: chrono.hxx:50
Definition: chrono.hxx:35
int _ctrLines
Definition: chrono.hxx:37
double _ctrCumul
Definition: chrono.hxx:39
int _ctrOccur
Definition: chrono.hxx:38
char * _ctrNames
Definition: chrono.hxx:36

References acnt::_ctrNames, DEBTRACE, and yacsorb.CORBAEngineTest::i.

◆ ~counters()

counters::~counters ( )

Definition at line 46 of file chrono.cxx.

47 {
48  stats();
49 }
void stats()
Definition: chrono.cxx:51

Member Function Documentation

◆ stats()

void counters::stats ( )

Definition at line 51 of file chrono.cxx.

52 {
53  DEBTRACE("counters::stats()");
54  for (int i=0; i < _nbChrono; i++)
55  if (_ctrs[i]._ctrOccur)
56  {
57  std::cerr << "Compteur[" << i << "]: "<< _ctrs[i]._ctrNames << "[" << _ctrs[i]._ctrLines << "]" << std::endl;
58  std::cerr << " " << _ctrs[i]._ctrOccur << std::endl;
59  std::cerr << " " << _ctrs[i]._ctrCumul << std::endl;
60  }
61 }

References DEBTRACE, and yacsorb.CORBAEngineTest::i.

Member Data Documentation

◆ _ctrs

cntStruct * counters::_ctrs = 0
static

Definition at line 45 of file chrono.hxx.

Referenced by salome_chrono::stop().

◆ _nbChrono

int counters::_nbChrono
protected

Definition at line 50 of file chrono.hxx.


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