VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectQueueHealthMonitor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
16 
18 
19 namespace osg
20 {
21  class Node;
22 }
23 
24 #include <map>
25 #include <string>
26 #include <vector>
27 
28 namespace makVrv
29 {
30  class DtDe;
31 
47  {
48  public:
49 
52  static const unsigned int theDefaultStuckPollThreshold;
53 
54  public:
55 
62 
65 
67  static DtIndirectQueueHealthMonitor& instance(DtDe& de);
68 
73  virtual void updateGui();
74 
75  protected:
76 
78  explicit DtIndirectQueueHealthMonitor(DtDe& de);
79 
82  {
84  : myPollsQueueUnchanged(0)
85  , myIsActivelyCulled(false)
86  , myIsDeferred(false)
87  , myIsMoveDeferred(false)
88  , myLastSeenPoll(0)
89  {
90  // intentional noop
91  }
92 
95 
98 
100  unsigned int myPollsQueueUnchanged;
101 
107 
111 
117 
120  unsigned int myLastSeenPoll;
121 
123  std::string myName;
124  };
125 
128  {
130  : myIsDeferred(false)
131  , myPollsQueueUnchanged(0)
132  , myPollsBuildNumberUnchanged(0)
133  , myLastSeenPoll(0)
134  {
135  // intentional noop
136  }
137 
140 
143 
150 
155  unsigned int myPollsQueueUnchanged;
156 
160 
162  unsigned int myLastSeenPoll;
163 
165  std::string myName;
166  };
167 
170  virtual void pollQueues();
171 
175  virtual void pollGeometry(DtIndirectGeometry& geometry, const std::string& geometryKey);
176 
180  virtual void pollRegistrar(DtIndirectGeometryRegistrar& registrar, const std::string& registrarKey);
181 
183  virtual void drawRegistrarTable();
184 
186  virtual void drawGeometryTable();
187 
189  virtual void drawSummary();
190 
192  virtual void drawHelp();
193 
195  virtual void addAlert(const std::string& message);
196 
198  virtual void drawAlertLog();
199 
201  virtual void pruneStaleTracks();
202 
206  virtual void gatherGeometries(std::vector<DtIndirectGeometry*>& outGeometries) const;
207 
212  virtual void gatherGeometriesRecursive(osg::Node* node, std::vector<DtIndirectGeometry*>& outGeometries) const;
213 
216  static std::string toAddressKey(const void* pointer);
217 
218  protected:
219 
221 
223  bool myEnabled;
224 
228 
232 
235 
239 
241  unsigned int myPollCount;
242 
244  std::map<std::string, GeometryTrack> myGeometryTracks;
245 
247  std::map<std::string, RegistrarTrack> myRegistrarTracks;
248 
251 
254 
256  std::vector<std::string> myAlertLog;
257  };
258 }
bool myIsDeferred
true when the queue is non-empty but the geometry is not being visited; deferred work, shown dimmed or hidden by the filter
Definition: DtIndirectQueueHealthMonitor.h:110
Per-geometry live tracking state, keyed by address string.
Definition: DtIndirectQueueHealthMonitor.h:81
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
RegistrarTrack()
Definition: DtIndirectQueueHealthMonitor.h:129
Per-registrar live tracking state, keyed by address string.
Definition: DtIndirectQueueHealthMonitor.h:127
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Live, throttled monitor of the indirect rendering queues.
Definition: DtIndirectQueueHealthMonitor.h:46
Indirect geometry can have multiple models and their corresponding ids registered in it...
Definition: DtIndirectGeometryRegistrar.h:111
unsigned int myPollCount
monotonically increasing poll counter (polls while enabled)
Definition: DtIndirectQueueHealthMonitor.h:241
Debug-only. Snapshot of queue health counters for this registrar.
Definition: DtIndirectGeometryRegistrar.h:148
unsigned int myPollsQueueUnchanged
consecutive polls the register-model queue was non-empty while pump calls WERE arriving but produced ...
Definition: DtIndirectQueueHealthMonitor.h:155
GeometryTrack()
Definition: DtIndirectQueueHealthMonitor.h:83
static const unsigned int theDefaultStuckPollThreshold
number of consecutive polls a queue must be non-empty and unchanged before it is flagged as stuck ...
Definition: DtIndirectQueueHealthMonitor.h:52
unsigned int myPollsQueueUnchanged
consecutive polls the instance queue was non-empty and unchanged
Definition: DtIndirectQueueHealthMonitor.h:100
std::map< std::string, GeometryTrack > myGeometryTracks
per-geometry tracking, keyed by geometry address string
Definition: DtIndirectQueueHealthMonitor.h:244
DtIndirectGeometryRegistrar::DebugQueueHealthSnapshot mySnapshot
most recent snapshot
Definition: DtIndirectQueueHealthMonitor.h:139
bool myIsDeferred
true when the register-model queue has work but no pump calls are arriving (calls total flat...
Definition: DtIndirectQueueHealthMonitor.h:149
bool myShowDeferredRows
when true, deferred (not-culled, queue-non-empty) rows are shown dimmed in the geometry table; defaul...
Definition: DtIndirectQueueHealthMonitor.h:231
Contains makVrv::DtVirtualBaseClass class.
std::string myName
display name (captured, may go stale; display only)
Definition: DtIndirectQueueHealthMonitor.h:123
int myStuckPollThreshold
stuck-detection threshold in polls (ImGui adjustable)
Definition: DtIndirectQueueHealthMonitor.h:234
This class inherits from.
Definition: DtIndirectGeometry.h:122
Debug-only. Snapshot of queue health counters for this geometry.
Definition: DtIndirectGeometry.h:375
bool myIsActivelyCulled
true when the geometry&#39;s traversal frame advanced between the last two polls, i.e. it is actively being visited by the traversal. A non-empty queue on a non-visited geometry is classified as deferred (by design), not stuck.
Definition: DtIndirectQueueHealthMonitor.h:106
int myFramesSincePoll
frames since the last gather-and-poll pass
Definition: DtIndirectQueueHealthMonitor.h:250
DtIndirectGeometry::DebugQueueHealthSnapshot mySnapshot
most recent snapshot
Definition: DtIndirectQueueHealthMonitor.h:94
int myPollIntervalFrames
how often to gather and poll (frames); higher = less timing impact
Definition: DtIndirectQueueHealthMonitor.h:253
unsigned int myLastSeenPoll
poll counter value when this registrar was last seen
Definition: DtIndirectQueueHealthMonitor.h:162
std::vector< std::string > myAlertLog
bounded log of stuck-detection events (newest last)
Definition: DtIndirectQueueHealthMonitor.h:256
std::map< std::string, RegistrarTrack > myRegistrarTracks
per-registrar tracking, keyed by registrar address string
Definition: DtIndirectQueueHealthMonitor.h:247
bool myEntitiesOnly
when true (default), only IGT_ENTITY geometries are monitored; terrain/layer geometries defer work by...
Definition: DtIndirectQueueHealthMonitor.h:227
bool myIsMoveDeferred
true when in-progress moves are pending but not draining; move completion depends on the destination ...
Definition: DtIndirectQueueHealthMonitor.h:116
DtIndirectGeometry::DebugQueueHealthSnapshot myPreviousSnapshot
snapshot from the previous poll, for change detection
Definition: DtIndirectQueueHealthMonitor.h:97
unsigned int myLastSeenPoll
poll counter value when this geometry was last seen in the scene graph; used to prune tracks for dele...
Definition: DtIndirectQueueHealthMonitor.h:120
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
bool myEnabled
master enable; polling only happens while true
Definition: DtIndirectQueueHealthMonitor.h:223
DtIndirectGeometryRegistrar::DebugQueueHealthSnapshot myPreviousSnapshot
snapshot from the previous poll, for change detection
Definition: DtIndirectQueueHealthMonitor.h:142
std::string myName
display name (captured, may go stale; display only)
Definition: DtIndirectQueueHealthMonitor.h:165
Contains the DtIndirectGeometryRegistrar class declaration.
Contains the DtIndirectGeometry class declaration.
unsigned int myPollsBuildNumberUnchanged
consecutive polls the build number did not change while the registered models were marked dirty ...
Definition: DtIndirectQueueHealthMonitor.h:159
DtDe & myDe
Definition: DtIndirectQueueHealthMonitor.h:220
bool myLogOnStuck
when true, a one-shot warning is logged when a stuck state is first detected, so it is captured even ...
Definition: DtIndirectQueueHealthMonitor.h:238

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)