diff options
author | Richard Linden <none@none> | 2012-10-12 00:20:19 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2012-10-12 00:20:19 -0700 |
commit | 0f58ca02cdec62711eadb82ba28fcff08faef2ee (patch) | |
tree | 3816a47094ac89b7cc54fbf69426e2e634e8c622 /indra/llui | |
parent | b3107e37643743118840d3f5437e62196bae3581 (diff) |
SH-3275 WIP Update viewer metrics system to be more flexible
cleaned up accumulator merging logic
introduced frame recording to LLTrace directly instead of going through LLViewerStats
moved consumer code over to frame recording instead of whatever the current active recording was
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llstatbar.cpp | 7 | ||||
-rw-r--r-- | indra/llui/llstatbar.h | 35 | ||||
-rw-r--r-- | indra/llui/llstatgraph.cpp | 6 |
3 files changed, 26 insertions, 22 deletions
diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 4cbf695059..b73007e107 100644 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -37,7 +37,6 @@ #include "llstat.h" #include "lluictrlfactory.h" #include "lltracerecording.h" -#include "lltracethreadrecorder.h" /////////////////////////////////////////////////////////////////////////////////// @@ -112,17 +111,17 @@ void LLStatBar::draw() } else if (mFloatStatp) { - LLTrace::Recording* recording = LLTrace::get_thread_recorder()->getPrimaryRecording(); + LLTrace::Recording& recording = LLTrace::get_frame_recording().getLastRecordingPeriod(); if (mPerSec) { - current = recording->getSum(*mFloatStatp) / recording->getSampleTime(); + current = recording.getPerSec(*mFloatStatp); //min = recording->getMin(*mFloatStatp) / recording->getSampleTime(); //max = recording->getMax(*mFloatStatp) / recording->getSampleTime(); //mean = recording->getMean(*mFloatStatp) / recording->getSampleTime(); } else { - current = recording->getSum(*mFloatStatp); + current = recording.getSum(*mFloatStatp); //min = recording->getMin(*mFloatStatp); //max = recording->getMax(*mFloatStatp); //mean = recording->getMean(*mFloatStatp); diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index c735e7045b..bfc49b9204 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -29,8 +29,7 @@ #include "llview.h" #include "llframetimer.h" -#include "lltrace.h" - +#include "lltracerecording.h" class LLStat; class LLStatBar : public LLView @@ -39,19 +38,24 @@ public: struct Params : public LLInitParam::Block<Params, LLView::Params> { - Optional<std::string> label; - Optional<std::string> unit_label; - Optional<F32> bar_min; - Optional<F32> bar_max; - Optional<F32> tick_spacing; - Optional<F32> label_spacing; - Optional<U32> precision; - Optional<F32> update_rate; - Optional<bool> show_per_sec; - Optional<bool> show_bar; - Optional<bool> show_history; - Optional<bool> show_mean; - Optional<std::string> stat; + Optional<std::string> label, + unit_label; + + Optional<F32> bar_min, + bar_max, + tick_spacing, + label_spacing, + update_rate; + + Optional<U32> precision; + + Optional<bool> show_per_sec, + show_bar, + show_history, + show_mean; + + Optional<std::string> stat; + Params() : label("label"), unit_label("unit_label"), @@ -92,6 +96,7 @@ private: BOOL mDisplayBar; // Display the bar graph. BOOL mDisplayHistory; BOOL mDisplayMean; // If true, display mean, if false, display current value + LLTrace::PeriodicRecording* mFrameRecording; LLStat* mStatp; LLTrace::Rate<F32>* mFloatStatp; diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp index 1d4527aaa3..21b55c7c5a 100644 --- a/indra/llui/llstatgraph.cpp +++ b/indra/llui/llstatgraph.cpp @@ -86,15 +86,15 @@ void LLStatGraph::draw() } else if (mF32Statp) { - LLTrace::Recording* recording = LLTrace::get_thread_recorder()->getPrimaryRecording(); + LLTrace::Recording& recording = LLTrace::get_frame_recording().getLastRecordingPeriod(); if (mPerSec) { - mValue = recording->getSum(*mF32Statp) / recording->getSampleTime(); + mValue = recording.getPerSec(*mF32Statp); } else { - mValue = recording->getSum(*mF32Statp); + mValue = recording.getSum(*mF32Statp); } } |