Version: 8.3.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 ( int  nb)

Definition at line 29 of file chrono.cxx.

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

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 }
counters::~counters ( )

Definition at line 46 of file chrono.cxx.

47 {
48  stats();
49 }

Member Function Documentation

void counters::stats ( )

Definition at line 51 of file chrono.cxx.

References DEBTRACE, and CORBAEngineTest::i.

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 }

Member Data Documentation

cntStruct * counters::_ctrs = 0
static

Definition at line 45 of file chrono.hxx.

Referenced by salome_chrono::stop().

int counters::_nbChrono
protected

Definition at line 50 of file chrono.hxx.


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