From a6cc3b7159445eb4da5d17a7b19a3ec19625c318 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Mon, 6 May 2019 17:14:55 +0300 Subject: SL-11074 FIXED "Cache Hit Rate" in Statistics is broken --- indra/newview/lltexturefetch.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/lltexturefetch.cpp') diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index c9133338fb..f6cb787156 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -66,6 +66,7 @@ bool LLTextureFetchDebugger::sDebuggerEnabled = false ; LLTrace::CountStatHandle LLTextureFetch::sCacheHit("texture_cache_hit"); LLTrace::CountStatHandle LLTextureFetch::sCacheAttempt("texture_cache_attempt"); +LLTrace::EventStatHandle > LLTextureFetch::sCacheHitRate("texture_cache_hits"); LLTrace::SampleStatHandle LLTextureFetch::sCacheReadLatency("texture_cache_read_latency"); LLTrace::SampleStatHandle LLTextureFetch::sTexDecodeLatency("texture_decode_latency"); @@ -1311,6 +1312,7 @@ bool LLTextureFetchWorker::doWork(S32 param) LL_DEBUGS(LOG_TXT) << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize() << " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight()) << " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL; + record(LLTextureFetch::sCacheHitRate, LLUnits::Ratio::fromValue(1)); } else { @@ -1326,7 +1328,7 @@ bool LLTextureFetchWorker::doWork(S32 param) LL_DEBUGS(LOG_TXT) << mID << ": Not in Cache" << LL_ENDL; setState(LOAD_FROM_NETWORK); } - + record(LLTextureFetch::sCacheHitRate, LLUnits::Ratio::fromValue(0)); // fall through } } -- cgit v1.2.3 From d081df14ef4c19395b6c0f6e826764d91d4e034f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 29 May 2019 19:28:52 +0300 Subject: SL-11309 Crash on attempt to costruct singletone --- indra/newview/lltexturefetch.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/lltexturefetch.cpp') diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index f6cb787156..fe058024f6 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -2409,7 +2409,11 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, mLoaded = TRUE; setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); - LLViewerStatsRecorder::instance().log(0.2f); + if (LLViewerStatsRecorder::instanceExists()) + { + // Do not create this instance inside thread + LLViewerStatsRecorder::instance().log(0.2f); + } return data_size ; } -- cgit v1.2.3