diff options
author | Richard Linden <none@none> | 2012-10-01 19:39:04 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2012-10-01 19:39:04 -0700 |
commit | 14b1b0b2bb6bac5bc688cc4d14c33f1b680dd3b4 (patch) | |
tree | 74942f4fef955b5a55031650146e745bbc4ccd6f /indra/newview | |
parent | b1baf982b1bd41a150233d0a28d3601226924c65 (diff) |
SH-3275 WIP Run viewer metrics for object update messages
cleaned up API
samplers are now value types with copy-on-write buffers under the hood
removed coupling with LLThread
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llstatusbar.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/llviewerstats.cpp | 13 | ||||
-rwxr-xr-x | indra/newview/llviewerstats.h | 2 | ||||
-rw-r--r-- | indra/newview/llviewertexturelist.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llworld.cpp | 2 |
5 files changed, 10 insertions, 11 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 9f499ef4ef..ab97d6465a 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -198,7 +198,7 @@ BOOL LLStatusBar::postBuild() sgp.rect(r); sgp.follows.flags(FOLLOWS_BOTTOM | FOLLOWS_RIGHT); sgp.mouse_opaque(false); - sgp.stat.f32_stat(&STAT_KBIT); + sgp.stat.rate_stat(&STAT_KBIT); sgp.units("Kbps"); sgp.precision(0); mSGBandwidth = LLUICtrlFactory::create<LLStatGraph>(sgp); diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index b1aeaef91d..e2b09a1902 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -62,7 +62,7 @@ #include "llmeshrepository.h" //for LLMeshRepository::sBytesReceived -LLTrace::Stat<F32> STAT_KBIT("kbitstat"), +LLTrace::Rate<F32> STAT_KBIT("kbitstat"), STAT_LAYERS_KBIT("layerskbitstat"), STAT_OBJECT_KBIT("objectkbitstat"), STAT_ASSET_KBIT("assetkbitstat"), @@ -263,8 +263,7 @@ LLViewerStats::LLViewerStats() : mNumNewObjectsStat("numnewobjectsstat"), mNumSizeCulledStat("numsizeculledstat"), mNumVisCulledStat("numvisculledstat"), - mLastTimeDiff(0.0), - mSampler(LLThread::getTraceData()->createSampler()) + mLastTimeDiff(0.0) { for (S32 i = 0; i < ST_COUNT; i++) { @@ -467,12 +466,12 @@ void update_statistics() stats.mFPSStat.addValue(1); F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits()); - STAT_LAYERS_KBIT.sample(layer_bits/1024.f); + STAT_LAYERS_KBIT.add(layer_bits/1024.f); //stats.mLayersKBitStat.addValue(layer_bits/1024.f); - STAT_OBJECT_KBIT.sample(gObjectBits/1024.f); + STAT_OBJECT_KBIT.add(gObjectBits/1024.f); //stats.mObjectKBitStat.addValue(gObjectBits/1024.f); stats.mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending()); - STAT_ASSET_KBIT.sample(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f); + STAT_ASSET_KBIT.add(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f); //stats.mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f); gTransferManager.resetTransferBitsIn(LLTCT_ASSET); @@ -510,7 +509,7 @@ void update_statistics() static LLFrameTimer texture_stats_timer; if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq) { - STAT_TEXTURE_KBIT.sample(LLViewerTextureList::sTextureBits/1024.f); + STAT_TEXTURE_KBIT.add(LLViewerTextureList::sTextureBits/1024.f); //stats.mTextureKBitStat.addValue(LLViewerTextureList::sTextureBits/1024.f); stats.mTexturePacketsStat.addValue(LLViewerTextureList::sTexturePackets); gTotalTextureBytes += LLViewerTextureList::sTextureBits / 8; diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index ca70660ce9..9e809dd08c 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -31,7 +31,7 @@ #include "lltextureinfo.h" #include "lltracesampler.h" -extern LLTrace::Stat<F32> STAT_KBIT, +extern LLTrace::Rate<F32> STAT_KBIT, STAT_LAYERS_KBIT, STAT_OBJECT_KBIT, STAT_ASSET_KBIT, diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 034f8edf24..21a83b1676 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -622,7 +622,7 @@ void LLViewerTextureList::updateImages(F32 max_time) } cleared = FALSE; - LLTrace::Sampler* sampler = LLThread::getTraceData()->getPrimarySampler(); + LLTrace::Sampler* sampler = LLTrace::getThreadTrace()->getPrimarySampler(); LLAppViewer::getTextureFetch()->setTextureBandwidth(sampler->getMean(STAT_TEXTURE_KBIT) / sampler->getSampleTime()); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 97079e0588..1e8665e229 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -704,7 +704,7 @@ void LLWorld::updateNetStats() S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); LLViewerStats::getInstance()->mActualInKBitStat.addValue(actual_in_bits/1024.f); LLViewerStats::getInstance()->mActualOutKBitStat.addValue(actual_out_bits/1024.f); - STAT_KBIT.sample(bits/1024.f); + STAT_KBIT.add(bits/1024.f); //LLViewerStats::getInstance()->mKBitStat.addValue(bits/1024.f); LLViewerStats::getInstance()->mPacketsInStat.addValue(packets_in); LLViewerStats::getInstance()->mPacketsOutStat.addValue(packets_out); |