diff options
author | Teravus Ovares | 2008-01-16 17:07:46 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-01-16 17:07:46 +0000 |
commit | 771ed747e5c847297d20485efa2b87f302e54f88 (patch) | |
tree | 8aa7573a4cb086cda3cc9f29389b5c3f3a89baee /OpenSim | |
parent | * added missing using clause (diff) | |
download | opensim-SC-771ed747e5c847297d20485efa2b87f302e54f88.zip opensim-SC-771ed747e5c847297d20485efa2b87f302e54f88.tar.gz opensim-SC-771ed747e5c847297d20485efa2b87f302e54f88.tar.bz2 opensim-SC-771ed747e5c847297d20485efa2b87f302e54f88.tar.xz |
* Slowed down the sim stats update to once every 5 seconds because the network accounting required it... with it being the lowest updated stat.
* Time dilation is off now.. because it's the additive of the 0.91 * 10 (adds a second) / 5( the number of seconds since the last update) which results in 0.41td as common
* Slowing down the network accounting update will probably fix the red issue.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | 50 |
2 files changed, 29 insertions, 24 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index d6c9d1d..0a291a8 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -426,6 +426,7 @@ namespace OpenSim.Region.ClientStack | |||
426 | m_lastPacketsReceived = m_packetsReceived; | 426 | m_lastPacketsReceived = m_packetsReceived; |
427 | 427 | ||
428 | } | 428 | } |
429 | SendPacketStats(); | ||
429 | } | 430 | } |
430 | 431 | ||
431 | # region Setup | 432 | # region Setup |
@@ -2502,7 +2503,7 @@ namespace OpenSim.Region.ClientStack | |||
2502 | 2503 | ||
2503 | SendAcks(); | 2504 | SendAcks(); |
2504 | ResendUnacked(); | 2505 | ResendUnacked(); |
2505 | SendPacketStats(); | 2506 | |
2506 | 2507 | ||
2507 | } | 2508 | } |
2508 | 2509 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs index 38e3218..d4af90c 100644 --- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | |||
@@ -62,7 +62,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
62 | UnAckedBytes = 24 | 62 | UnAckedBytes = 24 |
63 | } | 63 | } |
64 | 64 | ||
65 | private int statsUpdatesEveryMS = 1000; | 65 | private int statsUpdatesEveryMS = 5000; |
66 | private int statsUpdateFactor = 0; | ||
66 | private float m_timeDilation = 0; | 67 | private float m_timeDilation = 0; |
67 | private int m_fps = 0; | 68 | private int m_fps = 0; |
68 | private float m_pfps = 0; | 69 | private float m_pfps = 0; |
@@ -96,6 +97,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
96 | 97 | ||
97 | public SimStatsReporter(RegionInfo regionData) | 98 | public SimStatsReporter(RegionInfo regionData) |
98 | { | 99 | { |
100 | statsUpdateFactor = (int)(statsUpdatesEveryMS / 1000); | ||
99 | ReportingRegion = regionData; | 101 | ReportingRegion = regionData; |
100 | for (int i = 0; i<19;i++) | 102 | for (int i = 0; i<19;i++) |
101 | { | 103 | { |
@@ -129,14 +131,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
129 | 131 | ||
130 | #region various statistic googly moogly | 132 | #region various statistic googly moogly |
131 | 133 | ||
132 | float simfps = (int) (m_fps*5); | 134 | float simfps = (int) ((m_fps * 5)); |
133 | 135 | ||
134 | if (simfps > 45) | 136 | //if (simfps > 45) |
135 | simfps = simfps - (simfps - 45); | 137 | //simfps = simfps - (simfps - 45); |
136 | if (simfps < 0) | 138 | //if (simfps < 0) |
137 | simfps = 0; | 139 | //simfps = 0; |
138 | 140 | ||
139 | float physfps = (m_pfps/statsUpdatesEveryMS); | 141 | float physfps = ((m_pfps / 1000)); |
140 | 142 | ||
141 | //if (physfps > 600) | 143 | //if (physfps > 600) |
142 | //physfps = physfps - (physfps - 600); | 144 | //physfps = physfps - (physfps - 600); |
@@ -148,19 +150,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
148 | 150 | ||
149 | //sb[0] = sbb; | 151 | //sb[0] = sbb; |
150 | sb[0].StatID = (uint) Stats.TimeDilation; | 152 | sb[0].StatID = (uint) Stats.TimeDilation; |
151 | sb[0].StatValue = (m_timeDilation); | 153 | sb[0].StatValue = ((m_timeDilation / statsUpdateFactor)); |
152 | 154 | ||
153 | //sb[1] = sbb; | 155 | //sb[1] = sbb; |
154 | sb[1].StatID = (uint) Stats.SimFPS; | 156 | sb[1].StatID = (uint) Stats.SimFPS; |
155 | sb[1].StatValue = simfps; | 157 | sb[1].StatValue = simfps/statsUpdateFactor; |
156 | 158 | ||
157 | //sb[2] = sbb; | 159 | //sb[2] = sbb; |
158 | sb[2].StatID = (uint) Stats.PhysicsFPS; | 160 | sb[2].StatID = (uint) Stats.PhysicsFPS; |
159 | sb[2].StatValue = physfps; | 161 | sb[2].StatValue = physfps / statsUpdateFactor; |
160 | 162 | ||
161 | //sb[3] = sbb; | 163 | //sb[3] = sbb; |
162 | sb[3].StatID = (uint) Stats.AgentUpdates; | 164 | sb[3].StatID = (uint) Stats.AgentUpdates; |
163 | sb[3].StatValue = (m_agentUpdates); | 165 | sb[3].StatValue = (m_agentUpdates / statsUpdateFactor); |
164 | 166 | ||
165 | //sb[4] = sbb; | 167 | //sb[4] = sbb; |
166 | sb[4].StatID = (uint) Stats.Agents; | 168 | sb[4].StatID = (uint) Stats.Agents; |
@@ -179,19 +181,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
179 | sb[7].StatValue = m_activePrim; | 181 | sb[7].StatValue = m_activePrim; |
180 | 182 | ||
181 | sb[8].StatID = (uint)Stats.FrameMS; | 183 | sb[8].StatID = (uint)Stats.FrameMS; |
182 | sb[8].StatValue = m_frameMS; | 184 | sb[8].StatValue = m_frameMS / statsUpdateFactor; |
183 | 185 | ||
184 | sb[9].StatID = (uint)Stats.NetMS; | 186 | sb[9].StatID = (uint)Stats.NetMS; |
185 | sb[9].StatValue = m_netMS; | 187 | sb[9].StatValue = m_netMS / statsUpdateFactor; |
186 | 188 | ||
187 | sb[10].StatID = (uint)Stats.PhysicsMS; | 189 | sb[10].StatID = (uint)Stats.PhysicsMS; |
188 | sb[10].StatValue = m_physicsMS; | 190 | sb[10].StatValue = m_physicsMS / statsUpdateFactor; |
189 | 191 | ||
190 | sb[11].StatID = (uint)Stats.ImageMS ; | 192 | sb[11].StatID = (uint)Stats.ImageMS ; |
191 | sb[11].StatValue = m_imageMS; | 193 | sb[11].StatValue = m_imageMS / statsUpdateFactor; |
192 | 194 | ||
193 | sb[12].StatID = (uint)Stats.OtherMS; | 195 | sb[12].StatID = (uint)Stats.OtherMS; |
194 | sb[12].StatValue = m_otherMS; | 196 | sb[12].StatValue = m_otherMS / statsUpdateFactor; |
195 | 197 | ||
196 | //sb[8] = sbb; | 198 | //sb[8] = sbb; |
197 | sb[13].StatID = (uint)Stats.InPacketsPerSecond; | 199 | sb[13].StatID = (uint)Stats.InPacketsPerSecond; |
@@ -199,14 +201,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
199 | 201 | ||
200 | //sb[9] = sbb; | 202 | //sb[9] = sbb; |
201 | sb[14].StatID = (uint)Stats.OutPacketsPerSecond; | 203 | sb[14].StatID = (uint)Stats.OutPacketsPerSecond; |
202 | sb[14].StatValue = (m_outPacketsPerSecond); | 204 | sb[14].StatValue = (m_outPacketsPerSecond / statsUpdateFactor); |
203 | 205 | ||
204 | //sb[10] = sbb; | 206 | //sb[10] = sbb; |
205 | sb[15].StatID = (uint)Stats.UnAckedBytes; | 207 | sb[15].StatID = (uint)Stats.UnAckedBytes; |
206 | sb[15].StatValue = m_unAckedBytes; | 208 | sb[15].StatValue = m_unAckedBytes; |
207 | 209 | ||
208 | sb[16].StatID = (uint)Stats.AgentMS; | 210 | sb[16].StatID = (uint)Stats.AgentMS; |
209 | sb[16].StatValue = m_agentMS; | 211 | sb[16].StatValue = m_agentMS / statsUpdateFactor; |
210 | 212 | ||
211 | sb[17].StatID = (uint)Stats.PendingDownloads; | 213 | sb[17].StatID = (uint)Stats.PendingDownloads; |
212 | sb[17].StatValue = m_pendingDownloads; | 214 | sb[17].StatValue = m_pendingDownloads; |
@@ -226,6 +228,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
226 | 228 | ||
227 | private void resetvalues() | 229 | private void resetvalues() |
228 | { | 230 | { |
231 | m_timeDilation = 0; | ||
229 | m_fps = 0; | 232 | m_fps = 0; |
230 | m_pfps = 0; | 233 | m_pfps = 0; |
231 | m_agentUpdates = 0; | 234 | m_agentUpdates = 0; |
@@ -244,12 +247,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
244 | 247 | ||
245 | public void SetTimeDilation(float td) | 248 | public void SetTimeDilation(float td) |
246 | { | 249 | { |
247 | m_timeDilation = td; | 250 | float tdsetting = td; |
248 | if (m_timeDilation > 1.0f) | 251 | //if (tdsetting > 1.0f) |
249 | m_timeDilation = (m_timeDilation - (m_timeDilation - 0.91f)); | 252 | //tdsetting = (tdsetting - (tdsetting - 0.91f)); |
250 | 253 | ||
251 | if (m_timeDilation < 0) | 254 | //if (tdsetting < 0) |
252 | m_timeDilation = 0.0f; | 255 | //tdsetting = 0.0f; |
256 | m_timeDilation += tdsetting; | ||
253 | } | 257 | } |
254 | 258 | ||
255 | public void SetRootAgents(int rootAgents) | 259 | public void SetRootAgents(int rootAgents) |