diff options
| author | Graham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com> | 2018-04-11 20:14:33 +0100 |
|---|---|---|
| committer | Graham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com> | 2018-04-11 20:14:33 +0100 |
| commit | c0e16b28001e4b34511d84537155f0c8b9d692d7 (patch) | |
| tree | 1a5d7ca59c9c159b755a6e143ead4677fe811a5c /indra/newview/llviewertexture.cpp | |
| parent | 6de246cd00a0d46763581dc8fa362c146e32d894 (diff) | |
Add stats for tex cache read / decode / fetch latency for comparison of old cache code with TCO.
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
| -rw-r--r-- | indra/newview/llviewertexture.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index e5a1bed48c..6e5193f6a3 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1178,9 +1178,17 @@ void LLViewerFetchedTexture::loadFromFastCache() } mInFastCacheList = FALSE; + add(LLTextureFetch::sCacheAttempt, 1.0); + + LLTimer fastCacheTimer; mRawImage = LLAppViewer::getTextureCache()->readFromFastCache(getID(), mRawDiscardLevel); if(mRawImage.notNull()) { + F32 cachReadTime = fastCacheTimer.getElapsedTimeF32(); + + add(LLTextureFetch::sCacheHit, 1.0); + sample(LLTextureFetch::sCacheReadLatency, cachReadTime); + mFullWidth = mRawImage->getWidth() << mRawDiscardLevel; mFullHeight = mRawImage->getHeight() << mRawDiscardLevel; setTexelsPerImage(); |
