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.cpp | 121 ++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 indra/newview/llviewerstatsrecorder.cpp (limited to 'indra/newview/llviewerstatsrecorder.cpp') diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp new file mode 100644 index 0000000000..4e7cf00ba0 --- /dev/null +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -0,0 +1,121 @@ +/** + * @file llviewerstatsrecorder.cpp + * @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$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llviewerstatsrecorder.h" +#include "llfile.h" +#include "llviewerregion.h" +#include "llviewerobject.h" + +LLViewerStatsRecorder::LLViewerStatsRecorder() : + mObjectCacheFile(NULL), + mTimer() +{ + mStartTime = LLTimer::getTotalTime(); +} + +LLViewerStatsRecorder::~LLViewerStatsRecorder() +{ + LLFile::close(mObjectCacheFile); + mObjectCacheFile = NULL; +} + + +void LLViewerStatsRecorder::initStatsRecorder(LLViewerRegion *regionp) +{ + // To do - something using region name or global position +#if LL_WINDOWS + std::string stats_file_name("C:\\ViewerObjectCacheStats.csv"); +#else + std::string stats_file_name("~/viewerstats.csv"); +#endif + + if (mObjectCacheFile == NULL) + { + mObjectCacheFile = LLFile::fopen(stats_file_name, "wb"); + if (mObjectCacheFile) + { // Write column headers + std::ostringstream data_msg; + data_msg << "Time, " + << "Hits, " + << "Misses, " + << "Objects " + << "\n"; + + fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + } + } +} + + +void LLViewerStatsRecorder::initCachedObjectUpdate(LLViewerRegion *regionp) +{ + mObjectCacheHitCount = 0; + mObjectCacheMissCount = 0; +} + + +void LLViewerStatsRecorder::recordCachedObjectEvent(LLViewerRegion *regionp, U32 local_id, LLViewerObject * objectp) +{ + if (objectp) + { + mObjectCacheHitCount++; + } + else + { // no object, must be a miss + mObjectCacheMissCount++; + } +} + +void LLViewerStatsRecorder::closeCachedObjectUpdate(LLViewerRegion *regionp) +{ + llinfos << "ILX: " << mObjectCacheHitCount + << " hits " + << mObjectCacheMissCount << " misses" + << llendl; + + S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCount; + if (mObjectCacheFile != NULL && + total_objects > 0) + { + std::ostringstream data_msg; + F32 now32 = (F32) ((LLTimer::getTotalTime() - mStartTime) / 1000.0); + + data_msg << now32 + << ", " << mObjectCacheHitCount + << ", " << mObjectCacheMissCount + << ", " << total_objects + << "\n"; + + fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + } + + mObjectCacheHitCount = 0; + mObjectCacheMissCount = 0; +} + + + -- cgit v1.2.3 From 0239421aa0c69fe9ce6b12671e927baaf05e5ae1 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Wed, 8 Dec 2010 17:42:47 -0800 Subject: Changed non-windows viewer stats recorder file to live in /tmp --- indra/newview/llviewerstatsrecorder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerstatsrecorder.cpp') diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 4e7cf00ba0..83c115af90 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -50,7 +50,7 @@ void LLViewerStatsRecorder::initStatsRecorder(LLViewerRegion *regionp) #if LL_WINDOWS std::string stats_file_name("C:\\ViewerObjectCacheStats.csv"); #else - std::string stats_file_name("~/viewerstats.csv"); + std::string stats_file_name("/tmp/viewerstats.csv"); #endif if (mObjectCacheFile == NULL) -- 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.cpp | 63 +++++++++++++++++++++++++-------- 1 file changed, 48 insertions(+), 15 deletions(-) (limited to 'indra/newview/llviewerstatsrecorder.cpp') diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 83c115af90..1b80a2bc1c 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -59,10 +59,14 @@ void LLViewerStatsRecorder::initStatsRecorder(LLViewerRegion *regionp) if (mObjectCacheFile) { // Write column headers std::ostringstream data_msg; - data_msg << "Time, " - << "Hits, " - << "Misses, " - << "Objects " + data_msg << "EventTime, " + << "ProcessingTime, " + << "CacheHits, " + << "CacheMisses, " + << "FullUpdates, " + << "TerseUpdates, " + << "CacheMissResponses, " + << "TotalUpdates " << "\n"; fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); @@ -71,42 +75,71 @@ void LLViewerStatsRecorder::initStatsRecorder(LLViewerRegion *regionp) } -void LLViewerStatsRecorder::initCachedObjectUpdate(LLViewerRegion *regionp) +void LLViewerStatsRecorder::initObjectUpdateEvents(LLViewerRegion *regionp) { + initStatsRecorder(regionp); mObjectCacheHitCount = 0; mObjectCacheMissCount = 0; + mObjectFullUpdates = 0; + mObjectTerseUpdates = 0; + mObjectCacheMissResponses = 0; + mProcessingTime = LLTimer::getTotalTime(); } -void LLViewerStatsRecorder::recordCachedObjectEvent(LLViewerRegion *regionp, U32 local_id, LLViewerObject * objectp) +void LLViewerStatsRecorder::recordObjectUpdateEvent(LLViewerRegion *regionp, U32 local_id, const EObjectUpdateType update_type, BOOL success, LLViewerObject * objectp) { - if (objectp) + if (!objectp) { - mObjectCacheHitCount++; + // no object, must be a miss + mObjectCacheMissCount++; } else - { // no object, must be a miss - mObjectCacheMissCount++; + { + switch (update_type) + { + case OUT_FULL: + mObjectFullUpdates++; + break; + case OUT_TERSE_IMPROVED: + mObjectTerseUpdates++; + break; + case OUT_FULL_COMPRESSED: + mObjectCacheMissResponses++; + break; + case OUT_FULL_CACHED: + default: + mObjectCacheHitCount++; + break; + }; } } -void LLViewerStatsRecorder::closeCachedObjectUpdate(LLViewerRegion *regionp) +void LLViewerStatsRecorder::closeObjectUpdateEvents(LLViewerRegion *regionp) { - llinfos << "ILX: " << mObjectCacheHitCount - << " hits " - << mObjectCacheMissCount << " misses" + llinfos << "ILX: " + << mObjectCacheHitCount << " hits, " + << mObjectCacheMissCount << " misses, " + << mObjectFullUpdates << " full updates, " + << mObjectTerseUpdates << " terse updates, " + << mObjectCacheMissResponses << " cache miss responses" << llendl; - S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCount; + S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissResponses;; if (mObjectCacheFile != NULL && total_objects > 0) { std::ostringstream data_msg; F32 now32 = (F32) ((LLTimer::getTotalTime() - mStartTime) / 1000.0); + F32 processing32 = (F32) ((LLTimer::getTotalTime() - mProcessingTime) / 1000.0); data_msg << now32 + << ", " << processing32 << ", " << mObjectCacheHitCount << ", " << mObjectCacheMissCount + << ", " << mObjectFullUpdates + << ", " << mObjectTerseUpdates + << ", " << mObjectCacheMissResponses << ", " << total_objects << "\n"; -- 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.cpp | 150 ++++++++++++++++++++++---------- 1 file changed, 103 insertions(+), 47 deletions(-) (limited to 'indra/newview/llviewerstatsrecorder.cpp') diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 1b80a2bc1c..27bbc17b36 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -30,43 +30,73 @@ #include "llviewerregion.h" #include "llviewerobject.h" + +// To do - something using region name or global position +#if LL_WINDOWS + static const std::string STATS_FILE_NAME("C:\\ViewerObjectCacheStats.csv"); +#else + static const std::string STATS_FILE_NAME("/tmp/viewerstats.csv"); +#endif + + +LLViewerStatsRecorder* LLViewerStatsRecorder::sInstance = NULL; LLViewerStatsRecorder::LLViewerStatsRecorder() : mObjectCacheFile(NULL), - mTimer() + mTimer(), + mRegionp(NULL), + mStartTime(0.f), + mProcessingTime(0.f) { - mStartTime = LLTimer::getTotalTime(); + if (NULL != sInstance) + { + llerrs << "Attempted to create multiple instances of LLViewerStatsRecorder!" << llendl; + } + sInstance = this; + clearStats(); } LLViewerStatsRecorder::~LLViewerStatsRecorder() { - LLFile::close(mObjectCacheFile); - mObjectCacheFile = NULL; + if (mObjectCacheFile != NULL) + { + LLFile::close(mObjectCacheFile); + mObjectCacheFile = NULL; + } } +// static +void LLViewerStatsRecorder::initClass() +{ + sInstance = new LLViewerStatsRecorder(); +} -void LLViewerStatsRecorder::initStatsRecorder(LLViewerRegion *regionp) +// static +void LLViewerStatsRecorder::cleanupClass() { - // To do - something using region name or global position -#if LL_WINDOWS - std::string stats_file_name("C:\\ViewerObjectCacheStats.csv"); -#else - std::string stats_file_name("/tmp/viewerstats.csv"); -#endif + delete sInstance; + sInstance = NULL; +} + +void LLViewerStatsRecorder::initStatsRecorder(LLViewerRegion *regionp) +{ if (mObjectCacheFile == NULL) { - mObjectCacheFile = LLFile::fopen(stats_file_name, "wb"); + mStartTime = LLTimer::getTotalTime(); + mObjectCacheFile = LLFile::fopen(STATS_FILE_NAME, "wb"); if (mObjectCacheFile) { // Write column headers std::ostringstream data_msg; data_msg << "EventTime, " << "ProcessingTime, " << "CacheHits, " - << "CacheMisses, " + << "CacheFullMisses, " + << "CacheCrcMisses, " << "FullUpdates, " << "TerseUpdates, " + << "CacheMissRequests, " << "CacheMissResponses, " - << "TotalUpdates " + << "UpdateFailures" << "\n"; fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); @@ -74,58 +104,83 @@ void LLViewerStatsRecorder::initStatsRecorder(LLViewerRegion *regionp) } } - -void LLViewerStatsRecorder::initObjectUpdateEvents(LLViewerRegion *regionp) +void LLViewerStatsRecorder::beginObjectUpdateEvents(LLViewerRegion *regionp) { initStatsRecorder(regionp); + mRegionp = regionp; + mProcessingTime = LLTimer::getTotalTime(); + clearStats(); +} + +void LLViewerStatsRecorder::clearStats() +{ mObjectCacheHitCount = 0; - mObjectCacheMissCount = 0; + mObjectCacheMissFullCount = 0; + mObjectCacheMissCrcCount = 0; mObjectFullUpdates = 0; mObjectTerseUpdates = 0; + mObjectCacheMissRequests = 0; mObjectCacheMissResponses = 0; - mProcessingTime = LLTimer::getTotalTime(); + mObjectUpdateFailures = 0; } -void LLViewerStatsRecorder::recordObjectUpdateEvent(LLViewerRegion *regionp, U32 local_id, const EObjectUpdateType update_type, BOOL success, LLViewerObject * objectp) +void LLViewerStatsRecorder::recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type) +{ + mObjectUpdateFailures++; +} + +void LLViewerStatsRecorder::recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type) { - if (!objectp) + if (LLViewerRegion::CACHE_MISS_TYPE_FULL == cache_miss_type) { - // no object, must be a miss - mObjectCacheMissCount++; + mObjectCacheMissFullCount++; } else - { - switch (update_type) - { - case OUT_FULL: - mObjectFullUpdates++; - break; - case OUT_TERSE_IMPROVED: - mObjectTerseUpdates++; - break; - case OUT_FULL_COMPRESSED: - mObjectCacheMissResponses++; - break; - case OUT_FULL_CACHED: - default: - mObjectCacheHitCount++; - break; - }; + { + mObjectCacheMissCrcCount++; } } -void LLViewerStatsRecorder::closeObjectUpdateEvents(LLViewerRegion *regionp) +void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp) +{ + switch (update_type) + { + case OUT_FULL: + mObjectFullUpdates++; + break; + case OUT_TERSE_IMPROVED: + mObjectTerseUpdates++; + break; + case OUT_FULL_COMPRESSED: + mObjectCacheMissResponses++; + break; + case OUT_FULL_CACHED: + default: + mObjectCacheHitCount++; + break; + }; +} + +void LLViewerStatsRecorder::recordRequestCacheMissesEvent(S32 count) +{ + mObjectCacheMissRequests += count; +} + +void LLViewerStatsRecorder::endObjectUpdateEvents() { llinfos << "ILX: " << mObjectCacheHitCount << " hits, " - << mObjectCacheMissCount << " misses, " + << mObjectCacheMissFullCount << " full misses, " + << mObjectCacheMissCrcCount << " crc misses, " << mObjectFullUpdates << " full updates, " << mObjectTerseUpdates << " terse updates, " - << mObjectCacheMissResponses << " cache miss responses" + << mObjectCacheMissRequests << " cache miss requests, " + << mObjectCacheMissResponses << " cache miss responses, " + << mObjectUpdateFailures << " update failures" << llendl; - S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissResponses;; + S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCrcCount + mObjectCacheMissFullCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissRequests + mObjectCacheMissResponses + mObjectUpdateFailures; if (mObjectCacheFile != NULL && total_objects > 0) { @@ -136,18 +191,19 @@ void LLViewerStatsRecorder::closeObjectUpdateEvents(LLViewerRegion *regionp) data_msg << now32 << ", " << processing32 << ", " << mObjectCacheHitCount - << ", " << mObjectCacheMissCount + << ", " << mObjectCacheMissFullCount + << ", " << mObjectCacheMissCrcCount << ", " << mObjectFullUpdates << ", " << mObjectTerseUpdates + << ", " << mObjectCacheMissRequests << ", " << mObjectCacheMissResponses - << ", " << total_objects + << ", " << mObjectUpdateFailures << "\n"; fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); } - mObjectCacheHitCount = 0; - mObjectCacheMissCount = 0; + clearStats(); } -- 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.cpp | 44 +++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerstatsrecorder.cpp') diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 27bbc17b36..b6ef260b6a 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -96,6 +96,10 @@ void LLViewerStatsRecorder::initStatsRecorder(LLViewerRegion *regionp) << "TerseUpdates, " << "CacheMissRequests, " << "CacheMissResponses, " + << "CacheUpdateDupes, " + << "CacheUpdateChanges, " + << "CacheUpdateAdds, " + << "CacheUpdateReplacements, " << "UpdateFailures" << "\n"; @@ -121,6 +125,10 @@ void LLViewerStatsRecorder::clearStats() mObjectTerseUpdates = 0; mObjectCacheMissRequests = 0; mObjectCacheMissResponses = 0; + mObjectCacheUpdateDupes = 0; + mObjectCacheUpdateChanges = 0; + mObjectCacheUpdateAdds = 0; + mObjectCacheUpdateReplacements = 0; mObjectUpdateFailures = 0; } @@ -156,9 +164,33 @@ void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectU mObjectCacheMissResponses++; break; case OUT_FULL_CACHED: - default: mObjectCacheHitCount++; break; + default: + llwarns << "Unknown update_type" << llendl; + break; + }; +} + +void LLViewerStatsRecorder::recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp) +{ + switch (update_result) + { + case LLViewerRegion::CACHE_UPDATE_DUPE: + mObjectCacheUpdateDupes++; + break; + case LLViewerRegion::CACHE_UPDATE_CHANGED: + mObjectCacheUpdateChanges++; + break; + case LLViewerRegion::CACHE_UPDATE_ADDED: + mObjectCacheUpdateAdds++; + break; + case LLViewerRegion::CACHE_UPDATE_REPLACED: + mObjectCacheUpdateReplacements++; + break; + default: + llwarns << "Unknown update_result type" << llendl; + break; }; } @@ -177,10 +209,14 @@ void LLViewerStatsRecorder::endObjectUpdateEvents() << mObjectTerseUpdates << " terse updates, " << mObjectCacheMissRequests << " cache miss requests, " << mObjectCacheMissResponses << " cache miss responses, " + << mObjectCacheUpdateDupes << " cache update dupes, " + << mObjectCacheUpdateChanges << " cache update changes, " + << mObjectCacheUpdateAdds << " cache update adds, " + << mObjectCacheUpdateReplacements << " cache update replacements, " << mObjectUpdateFailures << " update failures" << llendl; - S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCrcCount + mObjectCacheMissFullCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissRequests + mObjectCacheMissResponses + mObjectUpdateFailures; + S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCrcCount + mObjectCacheMissFullCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissRequests + mObjectCacheMissResponses + mObjectCacheUpdateDupes + mObjectCacheUpdateChanges + mObjectCacheUpdateAdds + mObjectCacheUpdateReplacements + mObjectUpdateFailures; if (mObjectCacheFile != NULL && total_objects > 0) { @@ -197,6 +233,10 @@ void LLViewerStatsRecorder::endObjectUpdateEvents() << ", " << mObjectTerseUpdates << ", " << mObjectCacheMissRequests << ", " << mObjectCacheMissResponses + << ", " << mObjectCacheUpdateDupes + << ", " << mObjectCacheUpdateChanges + << ", " << mObjectCacheUpdateAdds + << ", " << mObjectCacheUpdateReplacements << ", " << mObjectUpdateFailures << "\n"; -- 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.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerstatsrecorder.cpp') diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index b6ef260b6a..a8d1565742 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -221,10 +221,9 @@ void LLViewerStatsRecorder::endObjectUpdateEvents() total_objects > 0) { std::ostringstream data_msg; - F32 now32 = (F32) ((LLTimer::getTotalTime() - mStartTime) / 1000.0); F32 processing32 = (F32) ((LLTimer::getTotalTime() - mProcessingTime) / 1000.0); - data_msg << now32 + data_msg << getTimeSinceStart() << ", " << processing32 << ", " << mObjectCacheHitCount << ", " << mObjectCacheMissFullCount @@ -246,5 +245,9 @@ void LLViewerStatsRecorder::endObjectUpdateEvents() clearStats(); } +F32 LLViewerStatsRecorder::getTimeSinceStart() +{ + return (F32) ((LLTimer::getTotalTime() - mStartTime) / 1000.0); +} -- cgit v1.2.3 From 14e402cf5e8274caddaf1c763c2e044c53514b1e Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Thu, 16 Dec 2010 22:09:49 -0800 Subject: ER-414: Add object update type debug rendering view --- indra/newview/llviewerstatsrecorder.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerstatsrecorder.cpp') diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index a8d1565742..e9d21b4848 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -26,6 +26,9 @@ #include "llviewerprecompiledheaders.h" #include "llviewerstatsrecorder.h" + +#if LL_RECORD_VIEWER_STATS + #include "llfile.h" #include "llviewerregion.h" #include "llviewerobject.h" @@ -38,7 +41,6 @@ static const std::string STATS_FILE_NAME("/tmp/viewerstats.csv"); #endif - LLViewerStatsRecorder* LLViewerStatsRecorder::sInstance = NULL; LLViewerStatsRecorder::LLViewerStatsRecorder() : mObjectCacheFile(NULL), @@ -250,4 +252,7 @@ F32 LLViewerStatsRecorder::getTimeSinceStart() return (F32) ((LLTimer::getTotalTime() - mStartTime) / 1000.0); } +#endif + + -- cgit v1.2.3