From cb7a9eaa09fba301ba6b6838cb9e3cedfc29a32a Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 6 Oct 2008 19:52:54 +0000 Subject: * Stop the sim stats reporter reusing the same SimStatsPacket for all clients * I believe this was the cause of the remaining packet_out_of_order messages in the Linden client logs * There were race conditions where multiple clientstacks would overwrite each other's sequence numbers --- .../Framework/Statistics/SimExtraStatsCollector.cs | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'OpenSim/Framework/Statistics') diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs index 2f6bb7e..48bed81 100644 --- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs +++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs @@ -216,31 +216,31 @@ namespace OpenSim.Framework.Statistics /// client purposes) sends information to listeners. /// /// - public void ReceiveClassicSimStatsPacket(SimStatsPacket statsPacket) + public void ReceiveClassicSimStatsPacket(SimStats stats) { - // FIXME: Really shouldn't rely on the probably arbitrary order in which - // stats are packed into the packet - timeDilation = statsPacket.Stat[0].StatValue; - simFps = statsPacket.Stat[1].StatValue; - physicsFps = statsPacket.Stat[2].StatValue; - agentUpdates = statsPacket.Stat[3].StatValue; - rootAgents = statsPacket.Stat[4].StatValue; - childAgents = statsPacket.Stat[5].StatValue; - totalPrims = statsPacket.Stat[6].StatValue; - activePrims = statsPacket.Stat[7].StatValue; - totalFrameTime = statsPacket.Stat[8].StatValue; - netFrameTime = statsPacket.Stat[9].StatValue; - physicsFrameTime = statsPacket.Stat[10].StatValue; - otherFrameTime = statsPacket.Stat[11].StatValue; - imageFrameTime = statsPacket.Stat[12].StatValue; - inPacketsPerSecond = statsPacket.Stat[13].StatValue; - outPacketsPerSecond = statsPacket.Stat[14].StatValue; - unackedBytes = statsPacket.Stat[15].StatValue; - agentFrameTime = statsPacket.Stat[16].StatValue; - pendingDownloads = statsPacket.Stat[17].StatValue; - pendingUploads = statsPacket.Stat[18].StatValue; - activeScripts = statsPacket.Stat[19].StatValue; - scriptLinesPerSecond = statsPacket.Stat[20].StatValue; + // FIXME: SimStats shouldn't allow an arbitrary stat packing order (which is inherited from the original + // SimStatsPacket that was being used). + timeDilation = stats.StatsBlock[0].StatValue; + simFps = stats.StatsBlock[1].StatValue; + physicsFps = stats.StatsBlock[2].StatValue; + agentUpdates = stats.StatsBlock[3].StatValue; + rootAgents = stats.StatsBlock[4].StatValue; + childAgents = stats.StatsBlock[5].StatValue; + totalPrims = stats.StatsBlock[6].StatValue; + activePrims = stats.StatsBlock[7].StatValue; + totalFrameTime = stats.StatsBlock[8].StatValue; + netFrameTime = stats.StatsBlock[9].StatValue; + physicsFrameTime = stats.StatsBlock[10].StatValue; + otherFrameTime = stats.StatsBlock[11].StatValue; + imageFrameTime = stats.StatsBlock[12].StatValue; + inPacketsPerSecond = stats.StatsBlock[13].StatValue; + outPacketsPerSecond = stats.StatsBlock[14].StatValue; + unackedBytes = stats.StatsBlock[15].StatValue; + agentFrameTime = stats.StatsBlock[16].StatValue; + pendingDownloads = stats.StatsBlock[17].StatValue; + pendingUploads = stats.StatsBlock[18].StatValue; + activeScripts = stats.StatsBlock[19].StatValue; + scriptLinesPerSecond = stats.StatsBlock[20].StatValue; } /// -- cgit v1.1