summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llstatbar.cpp25
-rw-r--r--indra/llui/llstatbar.h2
-rw-r--r--indra/llui/llstatgraph.cpp8
-rw-r--r--indra/llui/llstatgraph.h5
4 files changed, 21 insertions, 19 deletions
diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp
index b73007e107..c60e5431ae 100644
--- a/indra/llui/llstatbar.cpp
+++ b/indra/llui/llstatbar.cpp
@@ -47,7 +47,7 @@ LLStatBar::LLStatBar(const Params& p)
mMinBar(p.bar_min),
mMaxBar(p.bar_max),
mStatp(LLStat::getInstance(p.stat)),
- mFloatStatp(LLTrace::Rate<F32>::getInstance(p.stat)),
+ mNewStatp(LLTrace::Count<>::getInstance(p.stat)),
mTickSpacing(p.tick_spacing),
mLabelSpacing(p.label_spacing),
mPrecision(p.precision),
@@ -109,22 +109,25 @@ void LLStatBar::draw()
mean = mStatp->getMean();
}
}
- else if (mFloatStatp)
+ else if (mNewStatp)
{
- LLTrace::Recording& recording = LLTrace::get_frame_recording().getLastRecordingPeriod();
+ LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording();
+ LLTrace::Recording& last_frame_recording = frame_recording.getLastRecordingPeriod();
+ LLTrace::Recording& windowed_frame_recording = frame_recording.getTotalRecording();
+
if (mPerSec)
{
- current = recording.getPerSec(*mFloatStatp);
- //min = recording->getMin(*mFloatStatp) / recording->getSampleTime();
- //max = recording->getMax(*mFloatStatp) / recording->getSampleTime();
- //mean = recording->getMean(*mFloatStatp) / recording->getSampleTime();
+ current = last_frame_recording.getPerSec(*mNewStatp);
+ //min = frame_window_recording.getMin(*mNewStatp) / frame_window_recording.getDuration();
+ //max = frame_window_recording.getMax(*mNewStatp) / frame_window_recording.getDuration();
+ mean = windowed_frame_recording.getPerSec(*mNewStatp);//frame_window_recording.getMean(*mNewStatp) / frame_window_recording.getDuration();
}
else
{
- current = recording.getSum(*mFloatStatp);
- //min = recording->getMin(*mFloatStatp);
- //max = recording->getMax(*mFloatStatp);
- //mean = recording->getMean(*mFloatStatp);
+ current = last_frame_recording.getSum(*mNewStatp);
+ //min = last_frame_recording.getMin(*mNewStatp);
+ //max = last_frame_recording.getMax(*mNewStatp);
+ mean = windowed_frame_recording.getSum(*mNewStatp);
}
}
diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h
index bfc49b9204..e4b0c61c42 100644
--- a/indra/llui/llstatbar.h
+++ b/indra/llui/llstatbar.h
@@ -99,7 +99,7 @@ private:
LLTrace::PeriodicRecording* mFrameRecording;
LLStat* mStatp;
- LLTrace::Rate<F32>* mFloatStatp;
+ LLTrace::Count<>* mNewStatp;
LLFrameTimer mUpdateTimer;
LLUIString mLabel;
diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp
index 21b55c7c5a..be3baeea76 100644
--- a/indra/llui/llstatgraph.cpp
+++ b/indra/llui/llstatgraph.cpp
@@ -49,7 +49,7 @@ LLStatGraph::LLStatGraph(const Params& p)
mPrecision(p.precision),
mValue(p.value),
mStatp(p.stat.legacy_stat),
- mF32Statp(p.stat.rate_stat)
+ mNewStatp(p.stat.rate_stat)
{
setToolTip(p.name());
@@ -84,17 +84,17 @@ void LLStatGraph::draw()
mValue = mStatp->getMean();
}
}
- else if (mF32Statp)
+ else if (mNewStatp)
{
LLTrace::Recording& recording = LLTrace::get_frame_recording().getLastRecordingPeriod();
if (mPerSec)
{
- mValue = recording.getPerSec(*mF32Statp);
+ mValue = recording.getPerSec(*mNewStatp);
}
else
{
- mValue = recording.getSum(*mF32Statp);
+ mValue = recording.getSum(*mNewStatp);
}
}
diff --git a/indra/llui/llstatgraph.h b/indra/llui/llstatgraph.h
index 69fc36ea52..54a959f49e 100644
--- a/indra/llui/llstatgraph.h
+++ b/indra/llui/llstatgraph.h
@@ -60,7 +60,7 @@ public:
struct StatParams : public LLInitParam::ChoiceBlock<StatParams>
{
Alternative<LLStat*> legacy_stat;
- Alternative<LLTrace::Rate<F32>* > rate_stat;
+ Alternative<LLTrace::Count<>* > rate_stat;
};
struct Params : public LLInitParam::Block<Params, LLView::Params>
@@ -106,8 +106,7 @@ public:
private:
LLStat* mStatp;
- LLTrace::Rate<F32>* mF32Statp;
- LLTrace::Rate<S32>* mS32Statp;
+ LLTrace::Count<>* mNewStatp;
BOOL mPerSec;