Version: 9.16.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;
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::_ctrCumul, acnt::_ctrLines, acnt::_ctrNames, acnt::_ctrOccur, _ctrs, _nbChrono, 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

References stats().

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 acnt::_ctrCumul, acnt::_ctrLines, acnt::_ctrNames, acnt::_ctrOccur, _ctrs, _nbChrono, DEBTRACE, and yacsorb.CORBAEngineTest::i.

Referenced by YACS::HMI::MenusBase::dummyAction(), and ~counters().

Member Data Documentation

◆ _ctrs

cntStruct * counters::_ctrs = 0
static

Definition at line 45 of file chrono.hxx.

Referenced by counters(), stats(), and salome_chrono::stop().

◆ _nbChrono

int counters::_nbChrono
protected

Definition at line 50 of file chrono.hxx.

Referenced by counters(), and stats().


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