All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
IDebugStats.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Streaming.h"
6 #include "Resources.h"
7 #include "Types.h"
8 
9 namespace Eegeo
10 {
11  namespace Debug
12  {
14  {
15  int totalRequests;
16  int totalBytesLoaded;
17  int totalBytesLoadedWeb;
18  int totalBytesLoadedCache;
19  int totalSuccessfulRequests;
20  int totalFailedRequests;
21  int totalPreDecompressBytesRead;
22  };
23 
24  struct StreamStat
25  {
26  int bytesLoaded;
27  int preDecompressBytesRead;
28  int totalRequests;
29  int successfulRequets;
30  int failedRequests;
31  int avgSizeKB;
32  int loadedFromWebKB;
33  int loadedFromCacheKB;
34  int numberOfWebLoads;
35  int numberOfCacheLoads;
36  int numberOfBuilds;
37  float loadTimeFromWebMS;
38  float loadTimeFromCacheMS;
39  float loadTimeForFailureMS;
40  float inflateTimeMS;
41  };
42 
44  {
45  public:
46  virtual ~IDebugStats() {}
47  virtual float FramesPerSecond() const = 0;
48  virtual float MaxFrameTimeMS() const = 0;
49  virtual float LastFrameTimeMS() const = 0;
50  virtual float AverageFramesPerSecond() const = 0;
51 
52  virtual size_t MemoryUsed() const = 0;
53  virtual size_t VirtualMemoryUsed() const = 0;
54  virtual size_t FreeMemory() const = 0;
55  virtual size_t GetPrivateDirtyByteCount() const = 0;
56  virtual size_t GetHeapByteCount() const = 0;
57 
58  virtual int ResourceNodeCacheAllocs() const = 0;
59  virtual int ResourceNodeCacheMisses() const = 0;
60  virtual int ResourceNodeCacheAdds() const = 0;
61  virtual int ResourceNodeCacheDeletions() const = 0;
62  virtual int ResourceNodeCacheSize() const = 0;
63 
64  virtual double CameraPositionLatitude() const = 0;
65  virtual double CameraPositionLongitude() const = 0;
66  virtual double CameraPositionAltitude() const = 0;
67  virtual float CameraRotationFromNorth() const = 0;
68  virtual double CameraDistanceToInterest() const = 0;
69  virtual float CameraFoVDegrees() const = 0;
70 
71  virtual double CameraInterestPointLatitude() const = 0;
72  virtual double CameraInterestPointLongitude() const = 0;
73  virtual double CameraInterestPointAltitude() const = 0;
74 
75  virtual int BitsPerSecond() const = 0;
76  virtual int MaxBitsPerSecond() const = 0;
78 
79  virtual int NumberOfStreams() const = 0;
80  virtual const char* NameOfStream(int streamIndex) const = 0;
81  virtual StreamStat StreamStatsForStream(int streamIndex) const = 0;
82 
83  virtual int PolyCount() const = 0;
84  virtual int DrawCalls() const = 0;
85 
86  virtual void RegisterStream(Eegeo::Streaming::LoggingResourceStream* resourceStream,
87  Eegeo::Resources::IResourceBuilder* resourceBuilder,
88  const char*& resourceName) = 0;
89 
90  virtual void Reset() = 0;
91  };
92  }
93 }