diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Monitoring/Stats/Stat.cs | 24 |
2 files changed, 25 insertions, 3 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 6c9e7c9..22cc79d 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -834,6 +834,8 @@ namespace OpenSim.Framework | |||
834 | /// </remarks> | 834 | /// </remarks> |
835 | event UpdateAgent OnAgentUpdate; | 835 | event UpdateAgent OnAgentUpdate; |
836 | 836 | ||
837 | event UpdateAgent OnAgentCameraUpdate; | ||
838 | |||
837 | event AgentRequestSit OnAgentRequestSit; | 839 | event AgentRequestSit OnAgentRequestSit; |
838 | event AgentSit OnAgentSit; | 840 | event AgentSit OnAgentSit; |
839 | event AvatarPickerRequest OnAvatarPickerRequest; | 841 | event AvatarPickerRequest OnAvatarPickerRequest; |
@@ -1489,7 +1491,7 @@ namespace OpenSim.Framework | |||
1489 | void SendChangeUserRights(UUID agentID, UUID friendID, int rights); | 1491 | void SendChangeUserRights(UUID agentID, UUID friendID, int rights); |
1490 | void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId); | 1492 | void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId); |
1491 | 1493 | ||
1492 | void StopFlying(ISceneEntity presence); | 1494 | void SendAgentTerseUpdate(ISceneEntity presence); |
1493 | 1495 | ||
1494 | void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data); | 1496 | void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data); |
1495 | } | 1497 | } |
diff --git a/OpenSim/Framework/Monitoring/Stats/Stat.cs b/OpenSim/Framework/Monitoring/Stats/Stat.cs index 9629b6e..ffd5132 100644 --- a/OpenSim/Framework/Monitoring/Stats/Stat.cs +++ b/OpenSim/Framework/Monitoring/Stats/Stat.cs | |||
@@ -225,7 +225,13 @@ namespace OpenSim.Framework.Monitoring | |||
225 | public virtual string ToConsoleString() | 225 | public virtual string ToConsoleString() |
226 | { | 226 | { |
227 | StringBuilder sb = new StringBuilder(); | 227 | StringBuilder sb = new StringBuilder(); |
228 | sb.AppendFormat("{0}.{1}.{2} : {3} {4}", Category, Container, ShortName, Value, UnitName); | 228 | sb.AppendFormat( |
229 | "{0}.{1}.{2} : {3}{4}", | ||
230 | Category, | ||
231 | Container, | ||
232 | ShortName, | ||
233 | Value, | ||
234 | UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName)); | ||
229 | 235 | ||
230 | AppendMeasuresOfInterest(sb); | 236 | AppendMeasuresOfInterest(sb); |
231 | 237 | ||
@@ -253,6 +259,8 @@ namespace OpenSim.Framework.Monitoring | |||
253 | == MeasuresOfInterest.AverageChangeOverTime) | 259 | == MeasuresOfInterest.AverageChangeOverTime) |
254 | { | 260 | { |
255 | double totalChange = 0; | 261 | double totalChange = 0; |
262 | double lastChangeOverTime = 0; | ||
263 | double? penultimateSample = null; | ||
256 | double? lastSample = null; | 264 | double? lastSample = null; |
257 | 265 | ||
258 | lock (m_samples) | 266 | lock (m_samples) |
@@ -266,13 +274,25 @@ namespace OpenSim.Framework.Monitoring | |||
266 | if (lastSample != null) | 274 | if (lastSample != null) |
267 | totalChange += s - (double)lastSample; | 275 | totalChange += s - (double)lastSample; |
268 | 276 | ||
277 | penultimateSample = lastSample; | ||
269 | lastSample = s; | 278 | lastSample = s; |
270 | } | 279 | } |
271 | } | 280 | } |
272 | 281 | ||
282 | if (lastSample != null && penultimateSample != null) | ||
283 | lastChangeOverTime | ||
284 | = ((double)lastSample - (double)penultimateSample) / (Watchdog.WATCHDOG_INTERVAL_MS / 1000); | ||
285 | |||
273 | int divisor = m_samples.Count <= 1 ? 1 : m_samples.Count - 1; | 286 | int divisor = m_samples.Count <= 1 ? 1 : m_samples.Count - 1; |
274 | 287 | ||
275 | sb.AppendFormat(", {0:0.##} {1}/s", totalChange / divisor / (Watchdog.WATCHDOG_INTERVAL_MS / 1000), UnitName); | 288 | double averageChangeOverTime = totalChange / divisor / (Watchdog.WATCHDOG_INTERVAL_MS / 1000); |
289 | |||
290 | sb.AppendFormat( | ||
291 | ", {0:0.##}{1}/s, {2:0.##}{3}/s", | ||
292 | lastChangeOverTime, | ||
293 | UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName), | ||
294 | averageChangeOverTime, | ||
295 | UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName)); | ||
276 | } | 296 | } |
277 | } | 297 | } |
278 | } | 298 | } |