From 22a07b1121bb429e6bfe10b5a5e859bcea1262b6 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 3 May 2023 12:48:22 -0400 Subject: SL-18330: fix strip_deprecated_header(cur_size) param to llssize. --- indra/newview/llmeshrepository.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llmeshrepository.cpp') diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index f937754368..18420a2356 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1865,7 +1865,7 @@ EMeshProcessingResult LLMeshRepoThread::headerReceived(const LLVolumeParams& mes U32 header_size = 0; if (data_size > 0) { - U32 dsize = data_size; + llssize dsize = data_size; char* result_ptr = strip_deprecated_header((char*)data, dsize, &header_size); data_size = dsize; -- cgit v1.3 From 90631fccef6ab1596655b18fb7dbdc87a4cb80ac Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 9 May 2023 17:16:26 +0100 Subject: SL-19676 - more update and scene loading stats. Added texture and mesh count --- indra/newview/llmeshrepository.cpp | 3 +++ indra/newview/lltexturefetch.cpp | 8 +++++++- indra/newview/llviewerstatsrecorder.cpp | 19 +++++++++++++------ indra/newview/llviewerstatsrecorder.h | 18 ++++++++++++++---- 4 files changed, 37 insertions(+), 11 deletions(-) (limited to 'indra/newview/llmeshrepository.cpp') 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 } } - 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(); }; -- cgit v1.3 From 3b13c0ca15e2bc413731b0be07db6446bb32df1b Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Fri, 26 May 2023 19:06:07 +0300 Subject: DRTVWR-582 xcode-14.3 merge follow up --- indra/llcommon/llsdserialize.cpp | 2 +- indra/llcommon/llsdserialize.h | 2 +- indra/newview/llmeshrepository.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llmeshrepository.cpp') diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index a904ce700e..3db456ddb3 100644 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -2443,7 +2443,7 @@ U8* unzip_llsdNavMesh( bool& valid, size_t& outsize, std::istream& is, S32 size return result; } -char* strip_deprecated_header(char* in, llssize& cur_size, U32* header_size) +char* strip_deprecated_header(char* in, llssize& cur_size, llssize* header_size) { const char* deprecated_header = ""; constexpr size_t deprecated_header_size = 17; diff --git a/indra/llcommon/llsdserialize.h b/indra/llcommon/llsdserialize.h index 5ddf0ff552..676b7bfd6a 100644 --- a/indra/llcommon/llsdserialize.h +++ b/indra/llcommon/llsdserialize.h @@ -873,5 +873,5 @@ LL_COMMON_API std::string zip_llsd(LLSD& data); LL_COMMON_API U8* unzip_llsdNavMesh( bool& valid, size_t& outsize,std::istream& is, S32 size); // returns a pointer to the array or past the array if the deprecated header exists -LL_COMMON_API char* strip_deprecated_header(char* in, llssize& cur_size, U32* header_size = nullptr); +LL_COMMON_API char* strip_deprecated_header(char* in, llssize& cur_size, llssize* header_size = nullptr); #endif // LL_LLSDSERIALIZE_H diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index ff888a5af2..d6eba6b4bf 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1863,7 +1863,7 @@ EMeshProcessingResult LLMeshRepoThread::headerReceived(const LLVolumeParams& mes const LLUUID mesh_id = mesh_params.getSculptID(); LLSD header; - U32 header_size = 0; + llssize header_size = 0; if (data_size > 0) { llssize dsize = data_size; -- cgit v1.3