merge
commit
f7d90f8bb9
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue