Skip to content
Snippets Groups Projects
Commit a325ad8f authored by Mnikolenko ProductEngine's avatar Mnikolenko ProductEngine
Browse files

MAINT-4662 FIXED Packet Loss always shows zero in the statistics floater

parent c0ae1fe9
No related branches found
No related tags found
No related merge requests found
......@@ -796,9 +796,12 @@ void LLWorld::updateNetStats()
add(LLStatViewer::PACKETS_IN, packets_in);
add(LLStatViewer::PACKETS_OUT, packets_out);
add(LLStatViewer::PACKETS_LOST, packets_lost);
if (packets_in)
F32 total_packets_in = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN);
if (total_packets_in > 0)
{
sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)packets_lost/(F32)packets_in));
F32 total_packets_lost = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_LOST);
sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)total_packets_lost/(F32)total_packets_in));
}
mLastPacketsIn = gMessageSystem->mPacketsIn;
......
......@@ -41,6 +41,7 @@
show_bar="true"/>
<stat_bar name="packet_loss"
label="Packet Loss"
decimal_digits="1"
stat="packetslostpercentstat"/>
<stat_bar name="ping"
label="Ping Sim"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment