diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2009-11-06 06:52:24 +0000 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2009-11-06 06:52:24 +0000 |
commit | 35e200881c38eb6c1bfd1f14ef440d4bc4da8c74 (patch) | |
tree | 8fceb759ef8f8259fd574c398ac02965566a05ff /indra/newview/llviewerstats.cpp | |
parent | 2f2bdd83d6e078fb6cdcbb0ba0a9eaa38d45cc90 (diff) |
merge QAR-1829: texture pipeline branch in viewer-2.0.0.3
Diffstat (limited to 'indra/newview/llviewerstats.cpp')
-rw-r--r-- | indra/newview/llviewerstats.cpp | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 6e07d8f246..caa94dba38 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -560,12 +560,18 @@ extern U32 gVisCompared; extern U32 gVisTested; std::map<S32,LLFrameTimer> gDebugTimers; +std::map<S32,std::string> gDebugTimerLabel; + +void init_statistics() +{ + // Label debug timers + gDebugTimerLabel[0] = "Texture"; +} void update_statistics(U32 frame_count) { gTotalWorldBytes += gVLManager.getTotalBytes(); gTotalObjectBytes += gObjectBits / 8; - gTotalTextureBytes += gTextureList.mTextureBits / 8; // make sure we have a valid time delta for this frame if (gFrameIntervalSeconds > 0.f) @@ -617,7 +623,6 @@ void update_statistics(U32 frame_count) F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits()); LLViewerStats::getInstance()->mLayersKBitStat.addValue(layer_bits/1024.f); LLViewerStats::getInstance()->mObjectKBitStat.addValue(gObjectBits/1024.f); - LLViewerStats::getInstance()->mTextureKBitStat.addValue(gTextureList.mTextureBits/1024.f); LLViewerStats::getInstance()->mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending()); LLViewerStats::getInstance()->mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f); gTransferManager.resetTransferBitsIn(LLTCT_ASSET); @@ -631,8 +636,6 @@ void update_statistics(U32 frame_count) gDebugTimers[0].unpause(); } - LLViewerStats::getInstance()->mTexturePacketsStat.addValue(gTextureList.mTexturePackets); - { static F32 visible_avatar_frames = 0.f; static F32 avg_visible_avatars = 0; @@ -652,8 +655,20 @@ void update_statistics(U32 frame_count) gObjectBits = 0; // gDecodedBits = 0; - gTextureList.mTextureBits = 0; - gTextureList.mTexturePackets = 0; + // Only update texture stats ones per second so that they are less noisy + { + static const F32 texture_stats_freq = 1.f; + static LLFrameTimer texture_stats_timer; + if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq) + { + LLViewerStats::getInstance()->mTextureKBitStat.addValue(LLViewerTextureList::sTextureBits/1024.f); + LLViewerStats::getInstance()->mTexturePacketsStat.addValue(LLViewerTextureList::sTexturePackets); + gTotalTextureBytes += LLViewerTextureList::sTextureBits / 8; + LLViewerTextureList::sTextureBits = 0; + LLViewerTextureList::sTexturePackets = 0; + texture_stats_timer.reset(); + } + } } @@ -826,3 +841,4 @@ void send_stats() LLViewerStats::getInstance()->addToMessage(body); LLHTTPClient::post(url, body, new ViewerStatsResponder()); } + |