From 29930baf23fbd8cd147cd78f60d01496479ae78e Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 17 Jul 2013 10:56:47 -0700 Subject: 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 diff --- indra/llcommon/lltracerecording.cpp | 1 - indra/llcommon/llunit.h | 13 +++++++++++++ indra/newview/llscenemonitor.cpp | 24 +++++++++++++++--------- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index 5d43771cb2..48b5a7c3fa 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -41,7 +41,6 @@ namespace LLTrace Recording::Recording(EPlayState state) : mElapsedSeconds(0), mInHandOff(false) - { mBuffers = new AccumulatorBufferGroup(); setPlayState(state); diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index 79465715cf..2e09973ef6 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -138,6 +138,13 @@ protected: storage_t mValue; }; +template +std::ostream& operator <<(std::ostream& s, const LLUnit& unit) +{ + s << unit.value() << UNIT_TYPE::getUnitLabel(); + return s; +} + template struct LLUnitImplicit : public LLUnit { @@ -162,6 +169,12 @@ struct LLUnitImplicit : public LLUnit } }; +template +std::ostream& operator <<(std::ostream& s, const LLUnitImplicit& unit) +{ + s << unit.value() << UNIT_TYPE::getUnitLabel(); + return s; +} template LL_FORCE_INLINE void ll_convert_units(LLUnit in, LLUnit& out, ...) diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 2f48be12fb..3f4f872174 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -469,8 +469,8 @@ void LLSceneMonitor::fetchQueryResult() static LLCachedControl 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 diff_threshold(gSavedSettings,"SceneLoadingPixelDiffThreshold"); - if(mDiffResult > diff_threshold()) - { - mSceneLoadRecording.extend(); - llassert(mSceneLoadRecording.getResults().getLastRecording().getDuration() > scene_load_sample_time); - } - else + F32 elapsed_time = timer.getElapsedTimeF32(); + + if (elapsed_time > scene_load_sample_time) { - 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(); + } } } -- cgit v1.2.3