aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2011-10-12 07:29:35 +0100
committerMelanie2011-10-12 07:29:35 +0100
commite3effc497474411c58861a46c17548ca6227e26e (patch)
tree981df9a31ce80f363d4b7c52b15a74a7e44705e1
parentMerge commit 'f138a2056ecea4016d75fec276a390955dbfd688' into bigmerge (diff)
parentStart recording object updates per second statistic (analogue of agent update... (diff)
downloadopensim-SC-e3effc497474411c58861a46c17548ca6227e26e.zip
opensim-SC-e3effc497474411c58861a46c17548ca6227e26e.tar.gz
opensim-SC-e3effc497474411c58861a46c17548ca6227e26e.tar.bz2
opensim-SC-e3effc497474411c58861a46c17548ca6227e26e.tar.xz
Merge branch 'master' into bigmerge
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/SimStatsReporter.cs28
3 files changed, 43 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
index 64997af..a75d94a 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
@@ -203,6 +203,14 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
203 m_monitors.Add( 203 m_monitors.Add(
204 new GenericMonitor( 204 new GenericMonitor(
205 m_scene, 205 m_scene,
206 "ObjectUpdatesPerSecondMonitor",
207 "Object Updates",
208 m => m.Scene.StatsReporter.LastReportedObjectUpdates,
209 m => string.Format("{0} per second", m.GetValue())));
210
211 m_monitors.Add(
212 new GenericMonitor(
213 m_scene,
206 "ActiveObjectCountMonitor", 214 "ActiveObjectCountMonitor",
207 "Active Objects", 215 "Active Objects",
208 m => m.Scene.StatsReporter.LastReportedSimStats[7], 216 m => m.Scene.StatsReporter.LastReportedSimStats[7],
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 1a96f1b..c6264b5 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -3072,6 +3072,7 @@ namespace OpenSim.Region.Framework.Scenes
3072 //isattachment = ParentGroup.RootPart.IsAttachment; 3072 //isattachment = ParentGroup.RootPart.IsAttachment;
3073 3073
3074 remoteClient.SendPrimUpdate(this, PrimUpdateFlags.FullUpdate); 3074 remoteClient.SendPrimUpdate(this, PrimUpdateFlags.FullUpdate);
3075 ParentGroup.Scene.StatsReporter.AddObjectUpdates(1);
3075 } 3076 }
3076 3077
3077 /// <summary> 3078 /// <summary>
@@ -4848,7 +4849,12 @@ namespace OpenSim.Region.Framework.Scenes
4848 4849
4849 // Causes this thread to dig into the Client Thread Data. 4850 // Causes this thread to dig into the Client Thread Data.
4850 // Remember your locking here! 4851 // Remember your locking here!
4851 remoteClient.SendPrimUpdate(this, PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); 4852 remoteClient.SendPrimUpdate(
4853 this,
4854 PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity
4855 | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity);
4856
4857 ParentGroup.Scene.StatsReporter.AddObjectUpdates(1);
4852 } 4858 }
4853 4859
4854 public void AddScriptLPS(int count) 4860 public void AddScriptLPS(int count)
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;