diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-05-31 01:58:09 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-05-31 01:58:09 +0300 |
commit | 9b0569840f06137ee2379463f5028a5342c3555a (patch) | |
tree | 279eaa517131fe4e073d8d9781e0b69e747a0bb9 /indra/newview/llviewerstats.cpp | |
parent | 1e09d25d9ce8b7ec8da28ad5364d81c0faab9d0a (diff) | |
parent | cdbd06e8ed6e3f4285a61f5c0b607a65dfdf8dfd (diff) |
Merge branch 'master' into DRTVWR-544-maint
# Conflicts:
# indra/llprimitive/llmodel.cpp
# indra/llprimitive/llmodel.h
# indra/newview/llappviewer.cpp
# indra/newview/llappviewer.h
Diffstat (limited to 'indra/newview/llviewerstats.cpp')
-rw-r--r-- | indra/newview/llviewerstats.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index dab11d4e04..ab7dad4ef8 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -182,8 +182,9 @@ SimMeasurement<F64Kilobytes > SIM_UNACKED_BYTES("simtotalunackedbytes", "", LL_S SimMeasurement<F64Megabytes > SIM_PHYSICS_MEM("physicsmemoryallocated", "", LL_SIM_STAT_SIMPHYSICSMEMORY); LLTrace::SampleStatHandle<F64Milliseconds > FRAMETIME_JITTER("frametimejitter", "Average delta between successive frame times"), - FRAMETIME_SLEW("frametimeslew", "Average delta between frame time and mean"), - SIM_PING("simpingstat"); + FRAMETIME_SLEW("frametimeslew", "Average delta between frame time and mean"), + FRAMETIME("frametime", "Measured frame time"), + SIM_PING("simpingstat"); LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Meters> > AGENT_POSITION_SNAP("agentpositionsnap", "agent position corrections"); @@ -261,8 +262,11 @@ void LLViewerStats::updateFrameStats(const F64Seconds time_diff) // new "stutter" meter add(LLStatViewer::FRAMETIME_DOUBLED, time_diff >= 2.0 * mLastTimeDiff ? 1 : 0); + sample(LLStatViewer::FRAMETIME, time_diff); + // old stats that were never really used - sample(LLStatViewer::FRAMETIME_JITTER, F64Milliseconds (mLastTimeDiff - time_diff)); + F64Seconds jit = (F64Seconds) std::fabs((mLastTimeDiff - time_diff)); + sample(LLStatViewer::FRAMETIME_JITTER, jit); F32Seconds average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount; sample(LLStatViewer::FRAMETIME_SLEW, F64Milliseconds (average_frametime - time_diff)); @@ -388,8 +392,12 @@ void update_statistics() gTransferManager.resetTransferBitsIn(LLTCT_ASSET); sample(LLStatViewer::VISIBLE_AVATARS, LLVOAvatar::sNumVisibleAvatars); - LLWorld::getInstance()->updateNetStats(); - LLWorld::getInstance()->requestCacheMisses(); + LLWorld *world = LLWorld::getInstance(); // not LLSingleton + if (world) + { + world->updateNetStats(); + world->requestCacheMisses(); + } // Reset all of these values. gVLManager.resetBitCounts(); @@ -541,7 +549,7 @@ void send_viewer_stats(bool include_preferences) { shader_level = 2; } - else if (gPipeline.canUseVertexShaders()) + else if (gPipeline.shadersLoaded()) { shader_level = 1; } |