diff options
author | Justin Clark-Casey (justincc) | 2011-10-11 22:17:05 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-10-11 22:17:05 +0100 |
commit | fe3594c5ea4fe36f862375f76d088f64d2dfb269 (patch) | |
tree | aeb7371c1a9778a919226978440f284024c91f55 /OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | |
parent | meaningless change to goose panda (diff) | |
download | opensim-SC-fe3594c5ea4fe36f862375f76d088f64d2dfb269.zip opensim-SC-fe3594c5ea4fe36f862375f76d088f64d2dfb269.tar.gz opensim-SC-fe3594c5ea4fe36f862375f76d088f64d2dfb269.tar.bz2 opensim-SC-fe3594c5ea4fe36f862375f76d088f64d2dfb269.tar.xz |
Start recording object updates per second statistic (analogue of agent updates per secod) and expose via monitoring module as ObjectUpdatePerSecondMonitor
A useful diagnostic to find out how object updates are burdening a scene
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SimStatsReporter.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index 8e1c8f0..6efbaa1 100644 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | |||
@@ -86,6 +86,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
86 | get { return lastReportedSimFPS; } | 86 | get { return lastReportedSimFPS; } |
87 | } | 87 | } |
88 | 88 | ||
89 | /// <summary> | ||
90 | /// Number of object updates performed in the last stats cycle | ||
91 | /// </summary> | ||
92 | /// <remarks> | ||
93 | /// This isn't sent out to the client but it is very useful data to detect whether viewers are being sent a | ||
94 | /// large number of object updates. | ||
95 | /// </remarks> | ||
96 | public float LastReportedObjectUpdates { get; private set; } | ||
97 | |||
89 | public float[] LastReportedSimStats | 98 | public float[] LastReportedSimStats |
90 | { | 99 | { |
91 | get { return lastReportedSimStats; } | 100 | get { return lastReportedSimStats; } |
@@ -100,8 +109,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
100 | private float lastReportedSimFPS = 0; | 109 | private float lastReportedSimFPS = 0; |
101 | private float[] lastReportedSimStats = new float[21]; | 110 | private float[] lastReportedSimStats = new float[21]; |
102 | private float m_pfps = 0; | 111 | private float m_pfps = 0; |
112 | |||
113 | /// <summary> | ||
114 | /// Number of agent updates requested in this stats cycle | ||
115 | /// </summary> | ||
103 | private int m_agentUpdates = 0; | 116 | private int m_agentUpdates = 0; |
104 | 117 | ||
118 | /// <summary> | ||
119 | /// Number of object updates requested in this stats cycle | ||
120 | /// </summary> | ||
121 | private int m_objectUpdates; | ||
122 | |||
105 | private int m_frameMS = 0; | 123 | private int m_frameMS = 0; |
106 | private int m_netMS = 0; | 124 | private int m_netMS = 0; |
107 | private int m_agentMS = 0; | 125 | private int m_agentMS = 0; |
@@ -291,6 +309,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
291 | { | 309 | { |
292 | handlerSendStatResult(simStats); | 310 | handlerSendStatResult(simStats); |
293 | } | 311 | } |
312 | |||
313 | // Extra statistics that aren't currently sent to clients | ||
314 | LastReportedObjectUpdates = m_objectUpdates / statsUpdateFactor; | ||
315 | |||
294 | resetvalues(); | 316 | resetvalues(); |
295 | } | 317 | } |
296 | } | 318 | } |
@@ -301,6 +323,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
301 | m_fps = 0; | 323 | m_fps = 0; |
302 | m_pfps = 0; | 324 | m_pfps = 0; |
303 | m_agentUpdates = 0; | 325 | m_agentUpdates = 0; |
326 | m_objectUpdates = 0; | ||
304 | //m_inPacketsPerSecond = 0; | 327 | //m_inPacketsPerSecond = 0; |
305 | //m_outPacketsPerSecond = 0; | 328 | //m_outPacketsPerSecond = 0; |
306 | m_unAckedBytes = 0; | 329 | m_unAckedBytes = 0; |
@@ -382,6 +405,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
382 | m_pfps += frames; | 405 | m_pfps += frames; |
383 | } | 406 | } |
384 | 407 | ||
408 | public void AddObjectUpdates(int numUpdates) | ||
409 | { | ||
410 | m_objectUpdates += numUpdates; | ||
411 | } | ||
412 | |||
385 | public void AddAgentUpdates(int numUpdates) | 413 | public void AddAgentUpdates(int numUpdates) |
386 | { | 414 | { |
387 | m_agentUpdates += numUpdates; | 415 | m_agentUpdates += numUpdates; |