From 0dce88bc92cfb1ebebb575087ca950a6d5363c0c Mon Sep 17 00:00:00 2001 From: Dave SIMmONs Date: Fri, 19 Nov 2010 16:49:24 -0800 Subject: ER-330 : Improve ObjectUpdateCached message packing. Added some viewer metrics, will disable later. --- indra/newview/llviewerstatsrecorder.h | 66 +++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 indra/newview/llviewerstatsrecorder.h (limited to 'indra/newview/llviewerstatsrecorder.h') diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h new file mode 100644 index 0000000000..0c5e6d5010 --- /dev/null +++ b/indra/newview/llviewerstatsrecorder.h @@ -0,0 +1,66 @@ +/** + * @file llviewerstatsrecorder.h + * @brief record info about viewer events to a metrics log file + * + * $LicenseInfo:firstyear=2010&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLVIEWERSTATSRECORDER_H +#define LLVIEWERSTATSRECORDER_H + + +// This is a diagnostic class used to record information from the viewer +// for analysis. + +// This is normally 0. Set to 1 to enable viewer stats recording +#define LL_RECORD_VIEWER_STATS 1 + + +#if LL_RECORD_VIEWER_STATS +#include "llframetimer.h" + +class LLViewerRegion; +class LLViewerObject; + +class LLViewerStatsRecorder +{ + public: + LLViewerStatsRecorder(); + ~LLViewerStatsRecorder(); + + void initStatsRecorder(LLViewerRegion *regionp); + + void initCachedObjectUpdate(LLViewerRegion *regionp); + void recordCachedObjectEvent(LLViewerRegion *regionp, U32 local_id, LLViewerObject * objectp); + void closeCachedObjectUpdate(LLViewerRegion *regionp); + +private: + LLFrameTimer mTimer; + F64 mStartTime; + + LLFILE * mObjectCacheFile; // File to write data into + S32 mObjectCacheHitCount; + S32 mObjectCacheMissCount; +}; +#endif // LL_RECORD_VIEWER_STATS + +#endif // LLVIEWERSTATSRECORDER_H -- cgit v1.2.3 From 03b68dad4bb6da4fa6ca7dcd05af91cfc96b4e31 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Thu, 9 Dec 2010 20:02:36 -0800 Subject: Expanded viewer stats recorder metrics to include all object update types --- indra/newview/llviewerstatsrecorder.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerstatsrecorder.h') diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h index 0c5e6d5010..213d15f963 100644 --- a/indra/newview/llviewerstatsrecorder.h +++ b/indra/newview/llviewerstatsrecorder.h @@ -37,6 +37,7 @@ #if LL_RECORD_VIEWER_STATS #include "llframetimer.h" +#include "llviewerobject.h" class LLViewerRegion; class LLViewerObject; @@ -49,17 +50,21 @@ class LLViewerStatsRecorder void initStatsRecorder(LLViewerRegion *regionp); - void initCachedObjectUpdate(LLViewerRegion *regionp); - void recordCachedObjectEvent(LLViewerRegion *regionp, U32 local_id, LLViewerObject * objectp); - void closeCachedObjectUpdate(LLViewerRegion *regionp); + void initObjectUpdateEvents(LLViewerRegion *regionp); + void recordObjectUpdateEvent(LLViewerRegion *regionp, U32 local_id, const EObjectUpdateType update_type, BOOL success, LLViewerObject * objectp); + void closeObjectUpdateEvents(LLViewerRegion *regionp); private: LLFrameTimer mTimer; F64 mStartTime; + F64 mProcessingTime; LLFILE * mObjectCacheFile; // File to write data into S32 mObjectCacheHitCount; S32 mObjectCacheMissCount; + S32 mObjectFullUpdates; + S32 mObjectTerseUpdates; + S32 mObjectCacheMissResponses; }; #endif // LL_RECORD_VIEWER_STATS -- cgit v1.2.3 From f4884faf3a020a718c611f34aa534e80d8a8b666 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Mon, 13 Dec 2010 12:33:19 -0800 Subject: Expanded viewer stats recorder to include cache miss type, cache miss requests, and update failures --- indra/newview/llviewerstatsrecorder.h | 44 ++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 13 deletions(-) (limited to 'indra/newview/llviewerstatsrecorder.h') diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h index 213d15f963..001b8d9bd6 100644 --- a/indra/newview/llviewerstatsrecorder.h +++ b/indra/newview/llviewerstatsrecorder.h @@ -39,6 +39,7 @@ #include "llframetimer.h" #include "llviewerobject.h" +class LLMutex; class LLViewerRegion; class LLViewerObject; @@ -48,24 +49,41 @@ class LLViewerStatsRecorder LLViewerStatsRecorder(); ~LLViewerStatsRecorder(); + static void initClass(); + static void cleanupClass(); + static LLViewerStatsRecorder* instance() {return sInstance; } + void initStatsRecorder(LLViewerRegion *regionp); - void initObjectUpdateEvents(LLViewerRegion *regionp); - void recordObjectUpdateEvent(LLViewerRegion *regionp, U32 local_id, const EObjectUpdateType update_type, BOOL success, LLViewerObject * objectp); - void closeObjectUpdateEvents(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 recordRequestCacheMissesEvent(S32 count); + void endObjectUpdateEvents(); private: - LLFrameTimer mTimer; - F64 mStartTime; - F64 mProcessingTime; - - LLFILE * mObjectCacheFile; // File to write data into - S32 mObjectCacheHitCount; - S32 mObjectCacheMissCount; - S32 mObjectFullUpdates; - S32 mObjectTerseUpdates; - S32 mObjectCacheMissResponses; + static LLViewerStatsRecorder* sInstance; + + LLFILE * mObjectCacheFile; // File to write data into + LLFrameTimer mTimer; + LLViewerRegion* mRegionp; + F64 mStartTime; + F64 mProcessingTime; + + S32 mObjectCacheHitCount; + S32 mObjectCacheMissFullCount; + S32 mObjectCacheMissCrcCount; + S32 mObjectFullUpdates; + S32 mObjectTerseUpdates; + S32 mObjectCacheMissRequests; + S32 mObjectCacheMissResponses; + S32 mObjectUpdateFailures; + + + void clearStats(); }; #endif // LL_RECORD_VIEWER_STATS #endif // LLVIEWERSTATSRECORDER_H + -- cgit v1.2.3 From b71b9ee08e0b59274346a3b4da2c33ff84a5eb90 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Mon, 13 Dec 2010 16:15:25 -0800 Subject: Added object update cache results to viewer stats recorder --- indra/newview/llviewerstatsrecorder.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llviewerstatsrecorder.h') diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h index 001b8d9bd6..16e04fb11e 100644 --- a/indra/newview/llviewerstatsrecorder.h +++ b/indra/newview/llviewerstatsrecorder.h @@ -38,6 +38,7 @@ #if LL_RECORD_VIEWER_STATS #include "llframetimer.h" #include "llviewerobject.h" +#include "llviewerregion.h" class LLMutex; class LLViewerRegion; @@ -59,6 +60,7 @@ class LLViewerStatsRecorder 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(); @@ -78,6 +80,10 @@ private: S32 mObjectTerseUpdates; S32 mObjectCacheMissRequests; S32 mObjectCacheMissResponses; + S32 mObjectCacheUpdateDupes; + S32 mObjectCacheUpdateChanges; + S32 mObjectCacheUpdateAdds; + S32 mObjectCacheUpdateReplacements; S32 mObjectUpdateFailures; -- cgit v1.2.3 From 01c13c3b9403991c04166f6ac57c93aaf5f17f83 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Mon, 13 Dec 2010 18:29:31 -0800 Subject: Added in-world color coding to objects based on update type --- indra/newview/llviewerstatsrecorder.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llviewerstatsrecorder.h') diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h index 16e04fb11e..f9ccdd6e78 100644 --- a/indra/newview/llviewerstatsrecorder.h +++ b/indra/newview/llviewerstatsrecorder.h @@ -64,6 +64,8 @@ class LLViewerStatsRecorder void recordRequestCacheMissesEvent(S32 count); void endObjectUpdateEvents(); + F32 getTimeSinceStart(); + private: static LLViewerStatsRecorder* sInstance; -- cgit v1.2.3 From 84516e337d887bf871e361bfebfce2695e8f443c Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Thu, 16 Dec 2010 19:20:47 -0800 Subject: Disabled debug viewer stats recorder --- indra/newview/llviewerstatsrecorder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerstatsrecorder.h') diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h index f9ccdd6e78..612ac380f7 100644 --- a/indra/newview/llviewerstatsrecorder.h +++ b/indra/newview/llviewerstatsrecorder.h @@ -32,7 +32,7 @@ // 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 -- cgit v1.2.3