VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtPerformanceStats.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
16 
17 #include <string>
18 #include <vector>
19 #include <map>
20 
21 #define MAX_FRAMES 60
22 
23 namespace makVrv
24 {
25  class DtKeyEvent;
29  {
30  public:
31  struct StatData
32  {
33  std::string name;
34  std::vector<DtProfileNode*> nodes;
35  double totals[MAX_FRAMES];
36  double totals_child[MAX_FRAMES];
37  };
38 
39  typedef std::vector<StatData*> StatList;
40  typedef std::map<std::string, StatList*> GroupMap;
41 
42  public:
43 
46 
48  virtual ~DtPerformanceStats();
49 
50  public:
51 
52  virtual void reset();
53 
55  virtual void addLabel(const std::string& group, const std::string& name);
56 
57  virtual void removeLabel(const std::string& group, const std::string& name);
58 
60  virtual void updateCallback();
61 
62  // accessor used by Imgui profiler
63  virtual const GroupMap& groupData() const;
64 
65  public:
66 
68  boost::signalslib::signal<void(const std::string&)> signal_statsChanged;
69 
70  protected:
71  virtual void updateGroupNodeList();
72  virtual void updateFrameTimes();
73 
75  virtual void appendToString(const std::string& str);
76  virtual bool findNodes(DtProfileNode* parent, const std::string& name, std::vector<DtProfileNode*>& found);
77 
78  protected:
80 
82 
86 
87  std::string myStatsInString;
91 
94  };
95 }
Profile node class stores timing data for a profiled section.
Definition: DtProfileNode.h:22
GroupMap myGroupData
Definition: DtPerformanceStats.h:81
int myFramesLowerThan60FPS
Definition: DtPerformanceStats.h:89
#define MAX_FRAMES
Definition: DtPerformanceStats.h:21
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
int myFramesRendered
Definition: DtPerformanceStats.h:90
Definition: DtPerformanceStats.h:31
int myPrevousEvictionCount
Definition: DtPerformanceStats.h:84
std::vector< StatData * > StatList
Definition: DtPerformanceStats.h:39
std::map< std::string, StatList * > GroupMap
Definition: DtPerformanceStats.h:40
int myCurrentFrameIndex
Definition: DtPerformanceStats.h:83
std::string myStatsInString
Definition: DtPerformanceStats.h:87
std::vector< DtProfileNode * > nodes
Definition: DtPerformanceStats.h:34
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtSignalConnectionManager myConnections
manager for connections
Definition: DtPerformanceStats.h:93
boost::signalslib::signal< void(const std::string &)> signal_statsChanged
Signals when the stats string changed.
Definition: DtPerformanceStats.h:68
Base class to provide boost signal/slot management.
int myFramesLowerThan30FPS
Definition: DtPerformanceStats.h:88
std::string name
Definition: DtPerformanceStats.h:33
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:72
A stats which shows the IG&#39;s performance stats.
Definition: DtPerformanceStats.h:28
DtDe & myDe
Definition: DtPerformanceStats.h:79
int myPreviousEvictionMemory
Definition: DtPerformanceStats.h:85

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)