diff options
author | Richard Linden <none@none> | 2013-07-08 00:55:17 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-07-08 00:55:17 -0700 |
commit | d122318bef2ff0eced7641dc24f411f792bd2935 (patch) | |
tree | 7c5bfc2c60058d6f87ad9c18c08f844424f3efc9 /indra/newview/llworld.cpp | |
parent | bc7d2b76961c0397dcd108e625db4304855f4539 (diff) |
SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics console
added percentage/ratio units
added auto-range and auto tick calculation to stat bar to automate display stats
Diffstat (limited to 'indra/newview/llworld.cpp')
-rwxr-xr-x | indra/newview/llworld.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index a95adbf442..d45a62b223 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -711,7 +711,7 @@ void LLWorld::renderPropertyLines() void LLWorld::updateNetStats() { - F32 bits = 0.f; + LLUnit<F64, LLUnits::Bits> bits = 0.f; U32 packets = 0; for (region_list_t::iterator iter = mActiveRegionList.begin(); @@ -729,19 +729,18 @@ void LLWorld::updateNetStats() S32 packets_out = gMessageSystem->mPacketsOut - mLastPacketsOut; S32 packets_lost = gMessageSystem->mDroppedPackets - mLastPacketsLost; - S32 actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); - S32 actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); + LLUnit<F64, LLUnits::Bits> actual_in_bits = gMessageSystem->mPacketRing.getAndResetActualInBits(); + LLUnit<F64, LLUnits::Bits> actual_out_bits = gMessageSystem->mPacketRing.getAndResetActualOutBits(); - add(LLStatViewer::ACTUAL_IN_KBIT, LLUnit<F64, LLUnits::Bits>(actual_in_bits)); - add(LLStatViewer::ACTUAL_OUT_KBIT, LLUnit<F64, LLUnits::Bits>(actual_out_bits)); - add(LLStatViewer::KBIT, LLUnit<F64, LLUnits::Bits>(bits)); + add(LLStatViewer::ACTUAL_IN_KBIT, actual_in_bits); + add(LLStatViewer::ACTUAL_OUT_KBIT, actual_out_bits); + add(LLStatViewer::KBIT, bits); add(LLStatViewer::PACKETS_IN, packets_in); add(LLStatViewer::PACKETS_OUT, packets_out); add(LLStatViewer::PACKETS_LOST, packets_lost); if (packets_in) { - F32 packet_loss = 100.f * ((F32)packets_lost/(F32)packets_in); - sample(LLStatViewer::PACKETS_LOST_PERCENT, packet_loss); + sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)packets_lost/(F32)packets_in)); } mLastPacketsIn = gMessageSystem->mPacketsIn; |