Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoPerfCounterManager.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2024 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : David BEILLOIN (Oct 2005)
22**=======================================================================*/
23
24
25#ifndef SO_PERF_COUNTER_MANAGER_H
26#define SO_PERF_COUNTER_MANAGER_H
27
28#include <Inventor/SbString.h>
29#include <Inventor/SbTime.h>
30
31class SoPerfCounterManagerImpl;
32class SoPerfCounter;
33
48public:
49
54
59 static SbBool isEnabled();
60
64 void resetAll();
65
71
77
82 void setInterval( const SbTime &intvl );
83
89
93 void log();
94
98 void update();
99
110
116
117private:
118
120 SoPerfCounter* getCounter( int n );
121
126 static void finish();
127
128 SoPerfCounterManagerImpl* m_soPerfCounterManagerImpl;
129
130private:
132 static SoPerfCounterManager* Instance();
133
136
139
140};
141
142#endif // SO_PERF_COUNTER_MANAGER_H
143
144
145
146
Character string stored in a hash table.
Definition SbName.h:162
Class for representation of a time.
Definition SbTime.h:91
Abstract base class for Performance Counter.
Performance Counter Manager.
void removeDisabledCounters() const
Removes disabled counters.
void resetAll()
Resets all counters.
void setInterval(const SbTime &intvl)
Sets the refresh counter rate.
static SbBool isEnabled()
Returns TRUE if performance counting is activated.
static SoPerfCounter * disableCounter(SbName name)
Disable a SoPerfCounter from logging by the performance counter manager.
void log()
Logs counter in an output file.
SbTime getInterval()
Gets the refresh counter rate.
void update()
Logs counter in defined output and reset counters.
static SoPerfCounterManager * getInstance()
Returns the existing instance.
static SbBool registerCounter(SoPerfCounter *)
Register a new SoPerfCounter to the performance counter manager.
SoPerfCounter * getCounter(SbName name)
Get the instance of a specific counter.
int SbBool
Boolean type.
Definition SbBase.h:87