aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs15
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs12
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/SimStatsReporter.cs24
4 files changed, 48 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index a7515f7..03f3cd0 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -60,6 +60,7 @@ namespace OpenSim.Region.Environment.Scenes
60 protected int m_numRootAgents = 0; 60 protected int m_numRootAgents = 0;
61 protected int m_numPrim = 0; 61 protected int m_numPrim = 0;
62 protected int m_numChildAgents = 0; 62 protected int m_numChildAgents = 0;
63 protected int m_physicalPrim = 0;
63 64
64 internal object m_syncRoot = new object(); 65 internal object m_syncRoot = new object();
65 66
@@ -177,7 +178,14 @@ namespace OpenSim.Region.Environment.Scenes
177 m_numPrim++; 178 m_numPrim++;
178 } 179 }
179 } 180 }
180 181 public void AddPhysicalPrim(int number)
182 {
183 m_physicalPrim++;
184 }
185 public void RemovePhysicalPrim(int number)
186 {
187 m_physicalPrim--;
188 }
181 public void RemovePrim(uint localID, LLUUID avatar_deleter) 189 public void RemovePrim(uint localID, LLUUID avatar_deleter)
182 { 190 {
183 foreach (EntityBase obj in Entities.Values) 191 foreach (EntityBase obj in Entities.Values)
@@ -287,6 +295,11 @@ namespace OpenSim.Region.Environment.Scenes
287 return m_numPrim; 295 return m_numPrim;
288 } 296 }
289 297
298 public int GetActiveObjects()
299 {
300 return m_physicalPrim;
301 }
302
290 #endregion 303 #endregion
291 304
292 #region Get Methods 305 #region Get Methods
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index ea67ba3..59548a2 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -582,6 +582,7 @@ namespace OpenSim.Region.Environment.Scenes
582 m_statsReporter.SetRootAgents(m_innerScene.GetRootAgentCount()); 582 m_statsReporter.SetRootAgents(m_innerScene.GetRootAgentCount());
583 m_statsReporter.SetChildAgents(m_innerScene.GetChildAgentCount()); 583 m_statsReporter.SetChildAgents(m_innerScene.GetChildAgentCount());
584 m_statsReporter.SetObjects(m_innerScene.GetTotalObjects()); 584 m_statsReporter.SetObjects(m_innerScene.GetTotalObjects());
585 m_statsReporter.SetActiveObjects(m_innerScene.GetActiveObjects());
585 586
586 } 587 }
587 catch (NotImplementedException) 588 catch (NotImplementedException)
@@ -1918,6 +1919,17 @@ namespace OpenSim.Region.Environment.Scenes
1918 { 1919 {
1919 m_innerScene.SwapRootChildAgent(rootChildChildRootTF); 1920 m_innerScene.SwapRootChildAgent(rootChildChildRootTF);
1920 } 1921 }
1922
1923 public void AddPhysicalPrim(int num)
1924 {
1925 m_innerScene.AddPhysicalPrim(num);
1926 }
1927
1928 public void RemovePhysicalPrim(int num)
1929 {
1930 m_innerScene.RemovePhysicalPrim(num);
1931 }
1932
1921 /// <summary> 1933 /// <summary>
1922 /// 1934 ///
1923 /// </summary> 1935 /// </summary>
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 6bb00cb..f6c0ee3 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1161,6 +1161,9 @@ namespace OpenSim.Region.Environment.Scenes
1161 1161
1162 if (PhysActor.IsPhysical) 1162 if (PhysActor.IsPhysical)
1163 { 1163 {
1164 if (!isNew)
1165 this.ParentGroup.m_scene.RemovePhysicalPrim(1);
1166
1164 PhysActor.OnRequestTerseUpdate -= PhysicsRequestingTerseUpdate; 1167 PhysActor.OnRequestTerseUpdate -= PhysicsRequestingTerseUpdate;
1165 PhysActor.OnOutOfBounds -= PhysicsOutOfBounds; 1168 PhysActor.OnOutOfBounds -= PhysicsOutOfBounds;
1166 } 1169 }
@@ -1184,6 +1187,8 @@ namespace OpenSim.Region.Environment.Scenes
1184 //RotationOffset.Y, RotationOffset.Z), UsePhysics); 1187 //RotationOffset.Y, RotationOffset.Z), UsePhysics);
1185 if (UsePhysics) 1188 if (UsePhysics)
1186 { 1189 {
1190 this.ParentGroup.m_scene.AddPhysicalPrim(1);
1191
1187 PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate; 1192 PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate;
1188 PhysActor.OnOutOfBounds += PhysicsOutOfBounds; 1193 PhysActor.OnOutOfBounds += PhysicsOutOfBounds;
1189 } 1194 }
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
index 9d9737a..15df619 100644
--- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
@@ -21,6 +21,7 @@ namespace OpenSim.Region.Environment.Scenes
21 PhysicsFPS = 2, 21 PhysicsFPS = 2,
22 AgentUpdates = 3, 22 AgentUpdates = 3,
23 TotalPrim = 11, 23 TotalPrim = 11,
24 ActivePrim = 12,
24 Agents = 13, 25 Agents = 13,
25 ChildAgents = 14, 26 ChildAgents = 14,
26 InPacketsPerSecond = 17, 27 InPacketsPerSecond = 17,
@@ -38,6 +39,7 @@ namespace OpenSim.Region.Environment.Scenes
38 private int m_numPrim = 0; 39 private int m_numPrim = 0;
39 private int m_inPacketsPerSecond = 0; 40 private int m_inPacketsPerSecond = 0;
40 private int m_outPacketsPerSecond = 0; 41 private int m_outPacketsPerSecond = 0;
42 private int m_activePrim = 0;
41 private int m_unAckedBytes = 0; 43 private int m_unAckedBytes = 0;
42 private RegionInfo ReportingRegion; 44 private RegionInfo ReportingRegion;
43 45
@@ -57,7 +59,7 @@ namespace OpenSim.Region.Environment.Scenes
57 { 59 {
58 m_report.Enabled = false; 60 m_report.Enabled = false;
59 SimStatsPacket statpack = new SimStatsPacket(); 61 SimStatsPacket statpack = new SimStatsPacket();
60 SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[10]; 62 SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[11];
61 statpack.Region = new SimStatsPacket.RegionBlock(); 63 statpack.Region = new SimStatsPacket.RegionBlock();
62 statpack.Region.RegionX = ReportingRegion.RegionLocX; 64 statpack.Region.RegionX = ReportingRegion.RegionLocX;
63 statpack.Region.RegionY = ReportingRegion.RegionLocY; 65 statpack.Region.RegionY = ReportingRegion.RegionLocY;
@@ -100,16 +102,20 @@ namespace OpenSim.Region.Environment.Scenes
100 sb[6].StatValue = m_numPrim; 102 sb[6].StatValue = m_numPrim;
101 103
102 sb[7] = new SimStatsPacket.StatBlock(); 104 sb[7] = new SimStatsPacket.StatBlock();
103 sb[7].StatID = (uint)Stats.InPacketsPerSecond; 105 sb[7].StatID = (uint)Stats.ActivePrim;
104 sb[7].StatValue = (int)(m_inPacketsPerSecond / statsUpdatesEveryMS); 106 sb[7].StatValue = m_activePrim;
105 107
106 sb[8] = new SimStatsPacket.StatBlock(); 108 sb[8] = new SimStatsPacket.StatBlock();
107 sb[8].StatID = (uint)Stats.OutPacketsPerSecond; 109 sb[8].StatID = (uint)Stats.InPacketsPerSecond;
108 sb[8].StatValue = (int)(m_outPacketsPerSecond / statsUpdatesEveryMS); 110 sb[8].StatValue = (int)(m_inPacketsPerSecond / statsUpdatesEveryMS);
109 111
110 sb[9] = new SimStatsPacket.StatBlock(); 112 sb[9] = new SimStatsPacket.StatBlock();
111 sb[9].StatID = (uint)Stats.UnAckedBytes; 113 sb[9].StatID = (uint)Stats.OutPacketsPerSecond;
112 sb[9].StatValue = (int) (m_unAckedBytes / statsUpdatesEveryMS); 114 sb[9].StatValue = (int)(m_outPacketsPerSecond / statsUpdatesEveryMS);
115
116 sb[10] = new SimStatsPacket.StatBlock();
117 sb[10].StatID = (uint)Stats.UnAckedBytes;
118 sb[10].StatValue = (int) (m_unAckedBytes / statsUpdatesEveryMS);
113 119
114 statpack.Stat = sb; 120 statpack.Stat = sb;
115 121
@@ -147,6 +153,10 @@ namespace OpenSim.Region.Environment.Scenes
147 { 153 {
148 m_numPrim = objects; 154 m_numPrim = objects;
149 } 155 }
156 public void SetActiveObjects(int objects)
157 {
158 m_activePrim = objects;
159 }
150 public void AddFPS(int frames) 160 public void AddFPS(int frames)
151 { 161 {
152 m_fps += frames; 162 m_fps += frames;