diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llmeshrepository.cpp | 3 | ||||
-rw-r--r-- | indra/newview/lltexturefetch.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llviewerstatsrecorder.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llviewerstatsrecorder.h | 18 |
4 files changed, 37 insertions, 11 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index f937754368..e2fb218b1b 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -56,6 +56,7 @@ #include "llviewermessage.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" +#include "llviewerstatsrecorder.h" #include "llviewertexturelist.h" #include "llvolume.h" #include "llvolumemgr.h" @@ -4089,6 +4090,8 @@ void LLMeshRepository::notifyMeshLoaded(const LLVolumeParams& mesh_params, LLVol } mLoadingMeshes[detail].erase(obj_iter); + + LLViewerStatsRecorder::instance().meshLoaded(); } } diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index b0d6a5d466..eea56af0ae 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -2183,7 +2183,6 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, LL_DEBUGS(LOG_TXT) << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << LL_ENDL; if (data_size > 0) { - LLViewerStatsRecorder::instance().textureFetch(data_size); // *TODO: set the formatted image data here directly to avoid the copy // Hold on to body for later copy @@ -2249,6 +2248,13 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, mHaveAllData = TRUE; } mRequestedSize = data_size; + + if (mHaveAllData) + { + LLViewerStatsRecorder::instance().textureFetch(); + } + + // *TODO: set the formatted image data here directly to avoid the copy } else { diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 64167135ac..f95a960186 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -80,7 +80,8 @@ void LLViewerStatsRecorder::clearStats() mObjectCacheUpdateReplacements = 0; mObjectUpdateFailures = 0; mObjectUpdateFailuresSize = 0; - mTextureFetchSize = 0; + mTextureFetchCount = 0; + mMeshLoadedCount = 0; } @@ -243,8 +244,9 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << "Cache Update Adds," << "Cache Update Replacements," << "Update Failures," - << "Texture Fetch bps," - << "\n"; + << "Texture Count," + << "Mesh Load Count," + << "\n"; data_size = col_headers.str().size(); if (fwrite(col_headers.str().c_str(), 1, data_size, mStatsFile ) != data_size) @@ -277,7 +279,8 @@ void LLViewerStatsRecorder::writeToLog( F32 interval ) << "," << mObjectCacheUpdateAdds << "," << mObjectCacheUpdateReplacements << "," << mObjectUpdateFailures - << "," << (mTextureFetchSize * 8 / delta_time) + << "," << mTextureFetchCount + << "," << mMeshLoadedCount << "\n"; data_size = stats_data.str().size(); @@ -329,10 +332,14 @@ F32 LLViewerStatsRecorder::getTimeSinceStart() return (F32) (LLFrameTimer::getTotalSeconds() - mFileOpenTime); } -void LLViewerStatsRecorder::recordTextureFetch( S32 msg_size ) +void LLViewerStatsRecorder::recordTextureFetch() { - mTextureFetchSize += msg_size; + mTextureFetchCount += 1; } +void LLViewerStatsRecorder::recordMeshLoaded() +{ + mMeshLoadedCount += 1; +} diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h index 90f8ca8742..37c08a51cf 100644 --- a/indra/newview/llviewerstatsrecorder.h +++ b/indra/newview/llviewerstatsrecorder.h @@ -101,14 +101,22 @@ class LLViewerStatsRecorder : public LLSingleton<LLViewerStatsRecorder> } } - void textureFetch(S32 msg_size) + void textureFetch() { if (mEnableStatsRecording) { - recordTextureFetch(msg_size); + recordTextureFetch(); } } + void meshLoaded() + { + if (mEnableStatsRecording) + { + recordMeshLoaded(); + } + } + void idle() { writeToLog(mInterval); @@ -123,7 +131,8 @@ private: void recordObjectUpdateEvent(const EObjectUpdateType update_type); void recordCacheFullUpdate(LLViewerRegion::eCacheUpdateResult update_result); void recordRequestCacheMissesEvent(S32 count); - void recordTextureFetch(S32 msg_size); + void recordTextureFetch(); + void recordMeshLoaded(); void writeToLog(F32 interval); void closeStatsFile(); void makeStatsFileName(); @@ -156,7 +165,8 @@ private: S32 mObjectCacheUpdateReplacements; S32 mObjectUpdateFailures; S32 mObjectUpdateFailuresSize; - S32 mTextureFetchSize; + S32 mTextureFetchCount; + S32 mMeshLoadedCount; void clearStats(); }; |