diff options
author | Teravus Ovares | 2007-12-14 00:49:40 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-12-14 00:49:40 +0000 |
commit | 7fdfeb58304d614970aa7c0010951ba5a8184e4b (patch) | |
tree | 9f59c6d23e15a100f87142e50bd5c1e834babf4e /OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | |
parent | From Michael Osias (IBM) (diff) | |
download | opensim-SC-7fdfeb58304d614970aa7c0010951ba5a8184e4b.zip opensim-SC-7fdfeb58304d614970aa7c0010951ba5a8184e4b.tar.gz opensim-SC-7fdfeb58304d614970aa7c0010951ba5a8184e4b.tar.bz2 opensim-SC-7fdfeb58304d614970aa7c0010951ba5a8184e4b.tar.xz |
* Added Active(physical) object count to the SimStatsReporter
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SimStatsReporter.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | 24 |
1 files changed, 17 insertions, 7 deletions
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; |