aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTeravus Ovares2007-12-12 14:07:26 +0000
committerTeravus Ovares2007-12-12 14:07:26 +0000
commit331db2336c4934d1c6cd79eff2719ae18f8ce1af (patch)
tree66d784680120d5f5bca3994f241d8c33f9ecc96f /OpenSim
parent* Fixed agent counts on the Simulator stats pane (diff)
downloadopensim-SC_OLD-331db2336c4934d1c6cd79eff2719ae18f8ce1af.zip
opensim-SC_OLD-331db2336c4934d1c6cd79eff2719ae18f8ce1af.tar.gz
opensim-SC_OLD-331db2336c4934d1c6cd79eff2719ae18f8ce1af.tar.bz2
opensim-SC_OLD-331db2336c4934d1c6cd79eff2719ae18f8ce1af.tar.xz
* Added Object count to sim stats (it's incorrect, however, it'll be fixed)
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs1
-rw-r--r--OpenSim/Region/Environment/Scenes/SimStatsReporter.cs24
3 files changed, 24 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index b274d47..3fe9a7b 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -281,6 +281,12 @@ namespace OpenSim.Region.Environment.Scenes
281 { 281 {
282 return m_numRootAgents; 282 return m_numRootAgents;
283 } 283 }
284
285 public int GetTotalObjects()
286 {
287 return m_numPrim;
288 }
289
284 #endregion 290 #endregion
285 291
286 #region Get Methods 292 #region Get Methods
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index ba43c37..fb7a558 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -581,6 +581,7 @@ namespace OpenSim.Region.Environment.Scenes
581 m_statsReporter.AddInPackets(0); 581 m_statsReporter.AddInPackets(0);
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 585
585 } 586 }
586 catch (NotImplementedException) 587 catch (NotImplementedException)
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
index b0f0e06..6810b16 100644
--- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
@@ -20,6 +20,7 @@ namespace OpenSim.Region.Environment.Scenes
20 SimFPS = 1, 20 SimFPS = 1,
21 PhysicsFPS = 2, 21 PhysicsFPS = 2,
22 AgentUpdates = 3, 22 AgentUpdates = 3,
23 TotalPrim = 11,
23 Agents = 13, 24 Agents = 13,
24 ChildAgents = 14, 25 ChildAgents = 14,
25 InPacketsPerSecond = 17, 26 InPacketsPerSecond = 17,
@@ -34,6 +35,7 @@ namespace OpenSim.Region.Environment.Scenes
34 private float m_agentUpdates = 0; 35 private float m_agentUpdates = 0;
35 private int m_rootAgents = 0; 36 private int m_rootAgents = 0;
36 private int m_childAgents = 0; 37 private int m_childAgents = 0;
38 private int m_numPrim = 0;
37 private int m_inPacketsPerSecond = 0; 39 private int m_inPacketsPerSecond = 0;
38 private int m_outPacketsPerSecond = 0; 40 private int m_outPacketsPerSecond = 0;
39 private int m_unAckedBytes = 0; 41 private int m_unAckedBytes = 0;
@@ -55,7 +57,7 @@ namespace OpenSim.Region.Environment.Scenes
55 { 57 {
56 m_report.Enabled = false; 58 m_report.Enabled = false;
57 SimStatsPacket statpack = new SimStatsPacket(); 59 SimStatsPacket statpack = new SimStatsPacket();
58 SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[9]; 60 SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[10];
59 statpack.Region = new SimStatsPacket.RegionBlock(); 61 statpack.Region = new SimStatsPacket.RegionBlock();
60 statpack.Region.RegionX = ReportingRegion.RegionLocX; 62 statpack.Region.RegionX = ReportingRegion.RegionLocX;
61 statpack.Region.RegionY = ReportingRegion.RegionLocY; 63 statpack.Region.RegionY = ReportingRegion.RegionLocY;
@@ -94,16 +96,20 @@ namespace OpenSim.Region.Environment.Scenes
94 sb[5].StatValue = m_childAgents; 96 sb[5].StatValue = m_childAgents;
95 97
96 sb[6] = new SimStatsPacket.StatBlock(); 98 sb[6] = new SimStatsPacket.StatBlock();
97 sb[6].StatID = (uint)Stats.InPacketsPerSecond; 99 sb[6].StatID = (uint)Stats.TotalPrim;
98 sb[6].StatValue = (int)(m_inPacketsPerSecond / statsUpdatesEveryMS); 100 sb[6].StatValue = m_numPrim;
99 101
100 sb[7] = new SimStatsPacket.StatBlock(); 102 sb[7] = new SimStatsPacket.StatBlock();
101 sb[7].StatID = (uint)Stats.OutPacketsPerSecond; 103 sb[7].StatID = (uint)Stats.InPacketsPerSecond;
102 sb[7].StatValue = (int)(m_outPacketsPerSecond / statsUpdatesEveryMS); 104 sb[7].StatValue = (int)(m_inPacketsPerSecond / statsUpdatesEveryMS);
103 105
104 sb[8] = new SimStatsPacket.StatBlock(); 106 sb[8] = new SimStatsPacket.StatBlock();
105 sb[8].StatID = (uint)Stats.UnAckedBytes; 107 sb[8].StatID = (uint)Stats.OutPacketsPerSecond;
106 sb[8].StatValue = (int) (m_unAckedBytes / statsUpdatesEveryMS); 108 sb[8].StatValue = (int)(m_outPacketsPerSecond / statsUpdatesEveryMS);
109
110 sb[9] = new SimStatsPacket.StatBlock();
111 sb[9].StatID = (uint)Stats.UnAckedBytes;
112 sb[9].StatValue = (int) (m_unAckedBytes / statsUpdatesEveryMS);
107 113
108 statpack.Stat = sb; 114 statpack.Stat = sb;
109 115
@@ -137,6 +143,10 @@ namespace OpenSim.Region.Environment.Scenes
137 { 143 {
138 m_childAgents = childAgents; 144 m_childAgents = childAgents;
139 } 145 }
146 public void SetObjects(int objects)
147 {
148 m_numPrim = objects;
149 }
140 public void AddFPS(int frames) 150 public void AddFPS(int frames)
141 { 151 {
142 m_fps += frames; 152 m_fps += frames;