VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtProfileManager.h
Go to the documentation of this file.
1 /*********************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************************/
5 
10 
11 #pragma once
12 
13 #include <vrvUtil/vrvUtil.h>
14 
15 #include <string>
16 
17 namespace makVrv
18 {
20  typedef unsigned long long DtUInt64;
21 
23  struct DtThreadProfileData;
24  class DtProfileIterator;
25  class DtProfileNode;
26 
30  {
31  public:
33  static void init();
34 
42  static void incrementClientCount();
43  static void decrementClientCount();
45 
47  static void startProfile(const char* name);
49  static void stopProfile();
50 
52  static void startPerformanceStat(const char* name);
54  static void stopPerformanceStat();
55 
57  static void getTime(DtUInt64& time);
58 
60  static void reset();
63  static void incrementFrameCounter();
65  static int frameCountSinceReset() {return theFrameCounter; }
67  static DtUInt64 timeSinceReset();
69  static DtUInt64 ticksPerSecond();
70 
72  static double averageFps();
74  static double instantFps();
76  static double lowestFps();
77 
79  static double instantFrameTime();
80  static double averageFrameTime();
81  static double highestFrameTime();
82 
84  static DtProfileIterator* profileIterator();
85 
87  static DtProfileIterator* statIterator();
88 
90  static void releaseIterator(DtProfileIterator* iterator );
91 
92  private:
97  {
98  public:
99  Initializer();
100  };
101  friend class Initializer;
103 
105  static DtThreadProfileData* getCurrentProfileNode();
106  static DtThreadProfileData* getCurrentPerformanceStatNode();
107 
110 
111  static bool theShouldReset;
112  static int theFrameCounter;
115 
118  static int theFrameTimeIndex;
119 
120  static int theClientCount;
121  };
122 }
123 
124 

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)