summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-03-04 19:55:55 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-03-04 21:15:15 +0200
commit3efe5b493442f2b90ffbb571d8fa24c8ab17bf5e (patch)
tree75c85a5a5fc86f08573dd54508d17e9f1b0af2a4 /indra/newview
parentc98002daa68163563b6c946a6d26c4c8b74176ae (diff)
#3644 Fix new logging of packet drops hitting performance
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappviewer.cpp1
-rw-r--r--indra/newview/llfloaterlagmeter.cpp1
-rw-r--r--indra/newview/llviewerstats.cpp2
-rw-r--r--indra/newview/llviewerstats.h1
-rw-r--r--indra/newview/llviewerthrottle.cpp1
-rw-r--r--indra/newview/llworld.cpp3
6 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index e8546d422b..c351f63e85 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3413,6 +3413,7 @@ LLSD LLAppViewer::getViewerInfo() const
info["PACKETS_LOST"] = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_LOST);
info["PACKETS_IN"] = packets_in;
info["PACKETS_PCT"] = 100.f*info["PACKETS_LOST"].asReal() / info["PACKETS_IN"].asReal();
+ info["PACKETS_DROPPED"] = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_DROPPED);
}
if (mServerReleaseNotesURL.empty())
diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp
index 28fa8dea9a..1377526f69 100644
--- a/indra/newview/llfloaterlagmeter.cpp
+++ b/indra/newview/llfloaterlagmeter.cpp
@@ -200,6 +200,7 @@ void LLFloaterLagMeter::determineNetwork()
// the network handlers are de-synched from the rendering.
F32Milliseconds client_frame_time = frame_recording.getPeriodMean(LLStatViewer::FRAME_STACKTIME);
+ // Todo: account for LLPacketRing dropped packets? viewer drops those when it can't keep up
if(packet_loss >= mNetworkPacketLossCritical)
{
mNetworkButton->setImageUnselected(LLUI::getUIImage(LAG_CRITICAL_IMAGE_NAME));
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 73aabf49d1..4f52ab644c 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -121,6 +121,7 @@ LLTrace::CountStatHandle<> FPS("FPS", "Frames rendered"),
PACKETS_IN("Packets In", "Packets received"),
PACKETS_LOST("packetsloststat", "Packets lost"),
PACKETS_OUT("packetsoutstat", "Packets sent"),
+ PACKETS_DROPPED("packetsdropped", "Packets dropped"),
TEXTURE_PACKETS("texturepacketsstat", "Texture data packets received"),
CHAT_COUNT("chatcount", "Chat messages sent"),
IM_COUNT("imcount", "IMs sent"),
@@ -647,6 +648,7 @@ void send_viewer_stats(bool include_preferences)
fail["send_packet"] = (S32) gMessageSystem->mSendPacketFailureCount;
fail["dropped"] = (S32) gMessageSystem->mDroppedPackets;
+ fail["ring_dropped"] = (S32)gMessageSystem->mPacketRing.getNumDroppedPackets();
fail["resent"] = (S32) gMessageSystem->mResentPackets;
fail["failed_resends"] = (S32) gMessageSystem->mFailedResendPackets;
fail["off_circuit"] = (S32) gMessageSystem->mOffCircuitPackets;
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index 8aed1c537e..4cab2b48a5 100644
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -119,6 +119,7 @@ extern LLTrace::CountStatHandle<> FPS,
PACKETS_IN,
PACKETS_LOST,
PACKETS_OUT,
+ PACKETS_DROPPED,
TEXTURE_PACKETS,
CHAT_COUNT,
IM_COUNT,
diff --git a/indra/newview/llviewerthrottle.cpp b/indra/newview/llviewerthrottle.cpp
index b0a00c29a4..dce85bcb03 100644
--- a/indra/newview/llviewerthrottle.cpp
+++ b/indra/newview/llviewerthrottle.cpp
@@ -304,6 +304,7 @@ void LLViewerThrottle::updateDynamicThrottle()
}
mUpdateTimer.reset();
+ // Todo: account for dropped packets from LLPacketRing (or make the thing threaded)
LLUnit<F32, LLUnits::Percent> mean_packets_lost = LLViewerStats::instance().getRecording().getMean(LLStatViewer::PACKETS_LOST_PERCENT);
if (mean_packets_lost > TIGHTEN_THROTTLE_THRESHOLD)
{
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index e0d8c25731..a1eed0340b 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -795,6 +795,7 @@ void LLWorld::updateNetStats()
S32 packets_in = gMessageSystem->mPacketsIn - mLastPacketsIn;
S32 packets_out = gMessageSystem->mPacketsOut - mLastPacketsOut;
S32 packets_lost = gMessageSystem->mDroppedPackets - mLastPacketsLost;
+ S32 ring_packets_dropped = gMessageSystem->mPacketRing.getNumDroppedPackets();
F64Bits actual_in_bits(gMessageSystem->mPacketRing.getAndResetActualInBits());
F64Bits actual_out_bits(gMessageSystem->mPacketRing.getAndResetActualOutBits());
@@ -805,6 +806,7 @@ void LLWorld::updateNetStats()
add(LLStatViewer::PACKETS_IN, packets_in);
add(LLStatViewer::PACKETS_OUT, packets_out);
add(LLStatViewer::PACKETS_LOST, packets_lost);
+ add(LLStatViewer::PACKETS_DROPPED, ring_packets_dropped);
F32 total_packets_in = (F32)LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN);
if (total_packets_in > 0.f)
@@ -838,6 +840,7 @@ void LLWorld::printPacketsLost()
<< " packets lost: " << cdp->getPacketsLost() << LL_ENDL;
}
}
+ LL_INFOS() << "Packets dropped by Packet Ring: " << gMessageSystem->mPacketRing.getNumDroppedPackets() << LL_ENDL;
}
void LLWorld::processCoarseUpdate(LLMessageSystem* msg, void** user_data)