summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerstatsrecorder.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerstatsrecorder.h')
-rw-r--r--indra/newview/llviewerstatsrecorder.h49
1 files changed, 40 insertions, 9 deletions
diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h
index 0c5e6d5010..612ac380f7 100644
--- a/indra/newview/llviewerstatsrecorder.h
+++ b/indra/newview/llviewerstatsrecorder.h
@@ -32,12 +32,15 @@
// for analysis.
// This is normally 0. Set to 1 to enable viewer stats recording
-#define LL_RECORD_VIEWER_STATS 1
+#define LL_RECORD_VIEWER_STATS 0
#if LL_RECORD_VIEWER_STATS
#include "llframetimer.h"
+#include "llviewerobject.h"
+#include "llviewerregion.h"
+class LLMutex;
class LLViewerRegion;
class LLViewerObject;
@@ -47,20 +50,48 @@ class LLViewerStatsRecorder
LLViewerStatsRecorder();
~LLViewerStatsRecorder();
+ static void initClass();
+ static void cleanupClass();
+ static LLViewerStatsRecorder* instance() {return sInstance; }
+
void initStatsRecorder(LLViewerRegion *regionp);
- void initCachedObjectUpdate(LLViewerRegion *regionp);
- void recordCachedObjectEvent(LLViewerRegion *regionp, U32 local_id, LLViewerObject * objectp);
- void closeCachedObjectUpdate(LLViewerRegion *regionp);
+ void beginObjectUpdateEvents(LLViewerRegion *regionp);
+ void recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type);
+ void recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type);
+ void recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp);
+ void recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp);
+ void recordRequestCacheMissesEvent(S32 count);
+ void endObjectUpdateEvents();
+
+ F32 getTimeSinceStart();
private:
- LLFrameTimer mTimer;
- F64 mStartTime;
+ static LLViewerStatsRecorder* sInstance;
+
+ LLFILE * mObjectCacheFile; // File to write data into
+ LLFrameTimer mTimer;
+ LLViewerRegion* mRegionp;
+ F64 mStartTime;
+ F64 mProcessingTime;
- LLFILE * mObjectCacheFile; // File to write data into
- S32 mObjectCacheHitCount;
- S32 mObjectCacheMissCount;
+ S32 mObjectCacheHitCount;
+ S32 mObjectCacheMissFullCount;
+ S32 mObjectCacheMissCrcCount;
+ S32 mObjectFullUpdates;
+ S32 mObjectTerseUpdates;
+ S32 mObjectCacheMissRequests;
+ S32 mObjectCacheMissResponses;
+ S32 mObjectCacheUpdateDupes;
+ S32 mObjectCacheUpdateChanges;
+ S32 mObjectCacheUpdateAdds;
+ S32 mObjectCacheUpdateReplacements;
+ S32 mObjectUpdateFailures;
+
+
+ void clearStats();
};
#endif // LL_RECORD_VIEWER_STATS
#endif // LLVIEWERSTATSRECORDER_H
+