summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcommon/lltracerecording.cpp17
-rw-r--r--indra/llcommon/lltracerecording.h1
-rwxr-xr-xindra/llui/llstatbar.cpp2
-rwxr-xr-xindra/newview/llviewerobjectlist.cpp4
4 files changed, 18 insertions, 6 deletions
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp
index 2150a44f12..9fce6c11cc 100644
--- a/indra/llcommon/lltracerecording.cpp
+++ b/indra/llcommon/lltracerecording.cpp
@@ -252,6 +252,11 @@ U32 Recording::getSampleCount( const TraceType<CountAccumulator>& stat )
return mBuffers->mCounts[stat.getIndex()].getSampleCount();
}
+bool Recording::hasValue(const TraceType<SampleAccumulator>& stat)
+{
+ return mBuffers->mSamples[stat.getIndex()].hasValue();
+}
+
F64 Recording::getMin( const TraceType<SampleAccumulator>& stat )
{
return mBuffers->mSamples[stat.getIndex()].getMin();
@@ -578,7 +583,10 @@ F64 PeriodicRecording::getPeriodMin( const TraceType<SampleAccumulator>& stat, s
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
- min_val = llmin(min_val, mRecordingPeriods[index].getMin(stat));
+ if (mRecordingPeriods[index].hasValue(stat))
+ {
+ min_val = llmin(min_val, mRecordingPeriods[index].getMin(stat));
+ }
}
return min_val;
}
@@ -592,7 +600,10 @@ F64 PeriodicRecording::getPeriodMax(const TraceType<SampleAccumulator>& stat, si
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
- max_val = llmax(max_val, mRecordingPeriods[index].getMax(stat));
+ if (mRecordingPeriods[index].hasValue(stat))
+ {
+ max_val = llmax(max_val, mRecordingPeriods[index].getMax(stat));
+ }
}
return max_val;
}
@@ -611,7 +622,7 @@ F64 PeriodicRecording::getPeriodMean( const TraceType<SampleAccumulator>& stat,
for (S32 i = 1; i <= num_periods; i++)
{
S32 index = (mCurPeriod + total_periods - i) % total_periods;
- if (mRecordingPeriods[index].getDuration() > 0.f)
+ if (mRecordingPeriods[index].getDuration() > 0.f && mRecordingPeriods[index].hasValue(stat))
{
LLUnit<F64, LLUnits::Seconds> recording_duration = mRecordingPeriods[index].getDuration();
mean += mRecordingPeriods[index].getMean(stat) * recording_duration.value();
diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h
index f5e4ea603c..51b411b7bd 100644
--- a/indra/llcommon/lltracerecording.h
+++ b/indra/llcommon/lltracerecording.h
@@ -209,6 +209,7 @@ namespace LLTrace
// SampleStatHandle accessors
+ bool hasValue(const TraceType<SampleAccumulator>& stat);
F64 getMin(const TraceType<SampleAccumulator>& stat);
template <typename T>
T getMin(const SampleStatHandle<T>& stat)
diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp
index 1af36c6fdb..ee73cfa40d 100755
--- a/indra/llui/llstatbar.cpp
+++ b/indra/llui/llstatbar.cpp
@@ -272,7 +272,7 @@ void LLStatBar::draw()
mean = frame_recording.getPeriodMean(*mSampleFloatp, num_frames);
// always show sample data if we've ever grabbed any samples
- show_data = mSampleFloatp->getPrimaryAccumulator()->hasValue();
+ show_data = last_frame_recording.hasValue(*mSampleFloatp);
}
S32 bar_top, bar_left, bar_right, bar_bottom;
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 4072ab524e..e50e666421 100755
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -355,7 +355,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry*
}
justCreated = true;
mNumNewObjects++;
- sample(sCacheHitRate, LLUnits::Percent::fromValue(100.f));
+ sample(sCacheHitRate, LLUnits::Ratio::fromValue(1));
}
if (objectp->isDead())
@@ -697,7 +697,7 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys,
continue; // no data packer, skip this object
}
- sample(sCacheHitRate, 100.f);
+ //sample(sCacheHitRate, LLUnits::Ratio::fromValue(0));
}
return;