From 49933aadb1b7044e947575bc377b34826e94fe99 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 11 Apr 2013 06:38:03 -0700 Subject: SH-3931 WIP Interesting: Add graphs to visualize scene load metrics removed MeanValueType --- indra/llcommon/lltrace.h | 31 +------------------------------ indra/llcommon/lltracerecording.h | 8 ++++---- indra/newview/llviewertexturelist.cpp | 2 +- 3 files changed, 6 insertions(+), 35 deletions(-) diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index a574be02da..376248c87a 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -231,15 +231,6 @@ private: template size_t AccumulatorBuffer::sNextStorageSlot = 0; - - -//TODO: replace with decltype when C++11 is enabled -template -struct MeanValueType -{ - typedef F64 type; -}; - template class TraceType : public LLInstanceTracker, std::string> @@ -382,6 +373,7 @@ private: U32 mNumSamples; }; + template class CountAccumulator { @@ -457,13 +449,6 @@ public: }; - -template<> -struct MeanValueType > -{ - typedef LLUnit type; -}; - template<> class TraceType : public TraceType @@ -475,13 +460,6 @@ public: {} }; -template<> -struct MeanValueType > -{ - typedef F64 type; -}; - - template<> class TraceType : public TraceType @@ -493,13 +471,6 @@ public: {} }; -template<> -struct MeanValueType > -{ - typedef LLUnit type; -}; - - class TimeBlock; class TimeBlockTreeNode { diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h index 0a3e9e5a0b..9ebcbdd8ce 100644 --- a/indra/llcommon/lltracerecording.h +++ b/indra/llcommon/lltracerecording.h @@ -345,9 +345,9 @@ namespace LLTrace } template - typename MeanValueType >::type getPeriodMean(const TraceType& stat) const + typename T::value_t getPeriodMean(const TraceType& stat) const { - typename MeanValueType >::type mean = 0.0; + typename T::value_t mean = 0.0; U32 num_periods = mRecordingPeriods.size(); for (S32 i = 0; i < num_periods; i++) { @@ -361,9 +361,9 @@ namespace LLTrace } template - typename MeanValueType >::type getPeriodMeanPerSec(const TraceType& stat) const + typename T::value_t getPeriodMeanPerSec(const TraceType& stat) const { - typename MeanValueType >::type mean = 0.0; + typename T::value_t mean = 0.0; U32 num_periods = mRecordingPeriods.size(); for (S32 i = 0; i < num_periods; i++) { diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 1bb4041bbd..ae677f541b 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -617,7 +617,7 @@ void LLViewerTextureList::updateImages(F32 max_time) } cleared = FALSE; - LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_KBIT).value()); + LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_KBIT)); { using namespace LLStatViewer; -- cgit v1.2.3