SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics console
made unit types work with ostreams fixed timing of scene monitor recordings to better respect requested time diffmeow-7.2.2
parent
bd078122e3
commit
29930baf23
|
|
@ -41,7 +41,6 @@ namespace LLTrace
|
|||
Recording::Recording(EPlayState state)
|
||||
: mElapsedSeconds(0),
|
||||
mInHandOff(false)
|
||||
|
||||
{
|
||||
mBuffers = new AccumulatorBufferGroup();
|
||||
setPlayState(state);
|
||||
|
|
|
|||
|
|
@ -138,6 +138,13 @@ protected:
|
|||
storage_t mValue;
|
||||
};
|
||||
|
||||
template<typename STORAGE_TYPE, typename UNIT_TYPE>
|
||||
std::ostream& operator <<(std::ostream& s, const LLUnit<STORAGE_TYPE, UNIT_TYPE>& unit)
|
||||
{
|
||||
s << unit.value() << UNIT_TYPE::getUnitLabel();
|
||||
return s;
|
||||
}
|
||||
|
||||
template<typename STORAGE_TYPE, typename UNIT_TYPE>
|
||||
struct LLUnitImplicit : public LLUnit<STORAGE_TYPE, UNIT_TYPE>
|
||||
{
|
||||
|
|
@ -162,6 +169,12 @@ struct LLUnitImplicit : public LLUnit<STORAGE_TYPE, UNIT_TYPE>
|
|||
}
|
||||
};
|
||||
|
||||
template<typename STORAGE_TYPE, typename UNIT_TYPE>
|
||||
std::ostream& operator <<(std::ostream& s, const LLUnitImplicit<STORAGE_TYPE, UNIT_TYPE>& unit)
|
||||
{
|
||||
s << unit.value() << UNIT_TYPE::getUnitLabel();
|
||||
return s;
|
||||
}
|
||||
|
||||
template<typename S1, typename T1, typename S2, typename T2>
|
||||
LL_FORCE_INLINE void ll_convert_units(LLUnit<S1, T1> in, LLUnit<S2, T2>& out, ...)
|
||||
|
|
|
|||
|
|
@ -469,8 +469,8 @@ void LLSceneMonitor::fetchQueryResult()
|
|||
static LLCachedControl<F32> scene_load_sample_time(gSavedSettings, "SceneLoadingMonitorSampleTime");
|
||||
static LLFrameTimer timer;
|
||||
|
||||
F32 elapsed_time = timer.getElapsedTimeF32();
|
||||
if(mDiffState == WAIT_ON_RESULT && elapsed_time > scene_load_sample_time)
|
||||
if(mDiffState == WAIT_ON_RESULT
|
||||
&& !LLAppViewer::instance()->quitRequested())
|
||||
{
|
||||
mDiffState = WAITING_FOR_NEXT_DIFF;
|
||||
|
||||
|
|
@ -487,14 +487,20 @@ void LLSceneMonitor::fetchQueryResult()
|
|||
record(sFramePixelDiff, mDiffResult);
|
||||
|
||||
static LLCachedControl<F32> diff_threshold(gSavedSettings,"SceneLoadingPixelDiffThreshold");
|
||||
if(mDiffResult > diff_threshold())
|
||||
F32 elapsed_time = timer.getElapsedTimeF32();
|
||||
|
||||
if (elapsed_time > scene_load_sample_time)
|
||||
{
|
||||
mSceneLoadRecording.extend();
|
||||
llassert(mSceneLoadRecording.getResults().getLastRecording().getDuration() > scene_load_sample_time);
|
||||
}
|
||||
else
|
||||
{
|
||||
mSceneLoadRecording.nextPeriod();
|
||||
if(mDiffResult > diff_threshold())
|
||||
{
|
||||
mSceneLoadRecording.extend();
|
||||
llinfos << mSceneLoadRecording.getResults().getLastRecording().getDuration() << llendl;
|
||||
llassert_always(mSceneLoadRecording.getResults().getLastRecording().getDuration() > scene_load_sample_time);
|
||||
}
|
||||
else
|
||||
{
|
||||
mSceneLoadRecording.nextPeriod();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue