diff options
author | Teravus Ovares | 2008-01-16 05:48:40 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-01-16 05:48:40 +0000 |
commit | 5dd741267eae5c7dfcd20372ba1b43904dd4503a (patch) | |
tree | 15bc97bf2552a6fb45aec9eea401aa9a80190efc /OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | |
parent | * Added Packets In/s, Packets Out/s and Current un_acked Packets to the SimSt... (diff) | |
download | opensim-SC_OLD-5dd741267eae5c7dfcd20372ba1b43904dd4503a.zip opensim-SC_OLD-5dd741267eae5c7dfcd20372ba1b43904dd4503a.tar.gz opensim-SC_OLD-5dd741267eae5c7dfcd20372ba1b43904dd4503a.tar.bz2 opensim-SC_OLD-5dd741267eae5c7dfcd20372ba1b43904dd4503a.tar.xz |
* Added Agent Time, Pending Downloads, and made Agent Updates/Sec actually accurate.
* We're only missing, the script related sim stats counters and the Images time counter and the Pending Uploads counter. The rest of them are actually implemented now.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SimStatsReporter.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs index 36c2868..38e3218 100644 --- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | |||
@@ -57,6 +57,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
57 | ChildAgents = 14, | 57 | ChildAgents = 14, |
58 | InPacketsPerSecond = 17, | 58 | InPacketsPerSecond = 17, |
59 | OutPacketsPerSecond = 18, | 59 | OutPacketsPerSecond = 18, |
60 | PendingDownloads = 19, | ||
61 | PendingUploads = 20, | ||
60 | UnAckedBytes = 24 | 62 | UnAckedBytes = 24 |
61 | } | 63 | } |
62 | 64 | ||
@@ -64,9 +66,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
64 | private float m_timeDilation = 0; | 66 | private float m_timeDilation = 0; |
65 | private int m_fps = 0; | 67 | private int m_fps = 0; |
66 | private float m_pfps = 0; | 68 | private float m_pfps = 0; |
67 | private float m_agentUpdates = 0; | 69 | private int m_agentUpdates = 0; |
68 | private int m_frameMS = 0; | 70 | private int m_frameMS = 0; |
69 | private int m_netMS = 0; | 71 | private int m_netMS = 0; |
72 | private int m_agentMS = 0; | ||
70 | private int m_physicsMS = 0; | 73 | private int m_physicsMS = 0; |
71 | private int m_imageMS = 0; | 74 | private int m_imageMS = 0; |
72 | private int m_otherMS = 0; | 75 | private int m_otherMS = 0; |
@@ -77,8 +80,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
77 | private int m_outPacketsPerSecond = 0; | 80 | private int m_outPacketsPerSecond = 0; |
78 | private int m_activePrim = 0; | 81 | private int m_activePrim = 0; |
79 | private int m_unAckedBytes = 0; | 82 | private int m_unAckedBytes = 0; |
83 | private int m_pendingDownloads = 0; | ||
84 | private int m_pendingUploads = 0; | ||
85 | |||
80 | 86 | ||
81 | SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[16]; | 87 | SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[19]; |
82 | SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock(); | 88 | SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock(); |
83 | SimStatsPacket statpack = (SimStatsPacket)PacketPool.Instance.GetPacket(PacketType.SimStats); | 89 | SimStatsPacket statpack = (SimStatsPacket)PacketPool.Instance.GetPacket(PacketType.SimStats); |
84 | 90 | ||
@@ -91,7 +97,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
91 | public SimStatsReporter(RegionInfo regionData) | 97 | public SimStatsReporter(RegionInfo regionData) |
92 | { | 98 | { |
93 | ReportingRegion = regionData; | 99 | ReportingRegion = regionData; |
94 | for (int i = 0; i<16;i++) | 100 | for (int i = 0; i<19;i++) |
95 | { | 101 | { |
96 | sb[i] = new SimStatsPacket.StatBlock(); | 102 | sb[i] = new SimStatsPacket.StatBlock(); |
97 | } | 103 | } |
@@ -157,7 +163,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
157 | sb[3].StatValue = (m_agentUpdates); | 163 | sb[3].StatValue = (m_agentUpdates); |
158 | 164 | ||
159 | //sb[4] = sbb; | 165 | //sb[4] = sbb; |
160 | //sb[4].StatID = (uint) Stats.Agents; | 166 | sb[4].StatID = (uint) Stats.Agents; |
161 | sb[4].StatValue = m_rootAgents; | 167 | sb[4].StatValue = m_rootAgents; |
162 | 168 | ||
163 | //sb[5] = sbb; | 169 | //sb[5] = sbb; |
@@ -188,17 +194,26 @@ namespace OpenSim.Region.Environment.Scenes | |||
188 | sb[12].StatValue = m_otherMS; | 194 | sb[12].StatValue = m_otherMS; |
189 | 195 | ||
190 | //sb[8] = sbb; | 196 | //sb[8] = sbb; |
191 | sb[13].StatID = (uint) Stats.InPacketsPerSecond; | 197 | sb[13].StatID = (uint)Stats.InPacketsPerSecond; |
192 | sb[13].StatValue = (m_inPacketsPerSecond); | 198 | sb[13].StatValue = (m_inPacketsPerSecond); |
193 | 199 | ||
194 | //sb[9] = sbb; | 200 | //sb[9] = sbb; |
195 | sb[14].StatID = (uint) Stats.OutPacketsPerSecond; | 201 | sb[14].StatID = (uint)Stats.OutPacketsPerSecond; |
196 | sb[14].StatValue = (m_outPacketsPerSecond); | 202 | sb[14].StatValue = (m_outPacketsPerSecond); |
197 | 203 | ||
198 | //sb[10] = sbb; | 204 | //sb[10] = sbb; |
199 | sb[15].StatID = (uint) Stats.UnAckedBytes; | 205 | sb[15].StatID = (uint)Stats.UnAckedBytes; |
200 | sb[15].StatValue = m_unAckedBytes; | 206 | sb[15].StatValue = m_unAckedBytes; |
201 | 207 | ||
208 | sb[16].StatID = (uint)Stats.AgentMS; | ||
209 | sb[16].StatValue = m_agentMS; | ||
210 | |||
211 | sb[17].StatID = (uint)Stats.PendingDownloads; | ||
212 | sb[17].StatValue = m_pendingDownloads; | ||
213 | |||
214 | sb[18].StatID = (uint)Stats.PendingUploads; | ||
215 | sb[18].StatValue = m_pendingUploads; | ||
216 | |||
202 | statpack.Stat = sb; | 217 | statpack.Stat = sb; |
203 | 218 | ||
204 | if (OnSendStatsResult != null) | 219 | if (OnSendStatsResult != null) |
@@ -218,6 +233,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
218 | m_outPacketsPerSecond = 0; | 233 | m_outPacketsPerSecond = 0; |
219 | m_unAckedBytes = 0; | 234 | m_unAckedBytes = 0; |
220 | m_frameMS = 0; | 235 | m_frameMS = 0; |
236 | m_agentMS = 0; | ||
221 | m_netMS = 0; | 237 | m_netMS = 0; |
222 | m_physicsMS = 0; | 238 | m_physicsMS = 0; |
223 | m_imageMS = 0; | 239 | m_imageMS = 0; |
@@ -266,7 +282,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
266 | m_pfps += frames; | 282 | m_pfps += frames; |
267 | } | 283 | } |
268 | 284 | ||
269 | public void AddAgentUpdates(float numUpdates) | 285 | public void AddAgentUpdates(int numUpdates) |
270 | { | 286 | { |
271 | m_agentUpdates += numUpdates; | 287 | m_agentUpdates += numUpdates; |
272 | } | 288 | } |
@@ -294,6 +310,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
294 | { | 310 | { |
295 | m_netMS += ms; | 311 | m_netMS += ms; |
296 | } | 312 | } |
313 | public void addAgentMS(int ms) | ||
314 | { | ||
315 | m_agentMS += ms; | ||
316 | } | ||
297 | public void addPhysicsMS(int ms) | 317 | public void addPhysicsMS(int ms) |
298 | { | 318 | { |
299 | m_physicsMS += ms; | 319 | m_physicsMS += ms; |
@@ -306,5 +326,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
306 | { | 326 | { |
307 | m_otherMS += ms; | 327 | m_otherMS += ms; |
308 | } | 328 | } |
329 | public void addPendingDownload(int count) | ||
330 | { | ||
331 | m_pendingDownloads += count; | ||
332 | } | ||
333 | |||
309 | } | 334 | } |
310 | } | 335 | } |