aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs
diff options
context:
space:
mode:
authoronefang2019-05-19 21:24:15 +1000
committeronefang2019-05-19 21:24:15 +1000
commit5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch)
treea9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs
parentAdd a build script. (diff)
downloadopensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip
opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz
opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2
opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to '')
-rwxr-xr-x[-rw-r--r--]OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs56
1 files changed, 33 insertions, 23 deletions
diff --git a/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs b/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs
index e4df7ee..88a0297 100644..100755
--- a/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs
+++ b/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs
@@ -34,6 +34,7 @@ using OpenMetaverse;
34using OpenMetaverse.StructuredData; 34using OpenMetaverse.StructuredData;
35using OpenSim.Framework.Monitoring.Interfaces; 35using OpenSim.Framework.Monitoring.Interfaces;
36 36
37
37namespace OpenSim.Framework.Monitoring 38namespace OpenSim.Framework.Monitoring
38{ 39{
39 /// <summary> 40 /// <summary>
@@ -71,6 +72,11 @@ namespace OpenSim.Framework.Monitoring
71 private volatile float pendingDownloads; 72 private volatile float pendingDownloads;
72 private volatile float pendingUploads; 73 private volatile float pendingUploads;
73 private volatile float activeScripts; 74 private volatile float activeScripts;
75 private volatile float spareTime;
76 private volatile float sleepTime;
77 private volatile float physicsStep;
78
79
74 private volatile float scriptLinesPerSecond; 80 private volatile float scriptLinesPerSecond;
75 private volatile float m_frameDilation; 81 private volatile float m_frameDilation;
76 private volatile float m_usersLoggingIn; 82 private volatile float m_usersLoggingIn;
@@ -84,17 +90,17 @@ namespace OpenSim.Framework.Monitoring
84// /// haven't yet been implemented... 90// /// haven't yet been implemented...
85// /// </summary> 91// /// </summary>
86// public long AssetsInCache { get { return assetsInCache; } } 92// public long AssetsInCache { get { return assetsInCache; } }
87// 93//
88// /// <value> 94// /// <value>
89// /// Currently unused 95// /// Currently unused
90// /// </value> 96// /// </value>
91// public long TexturesInCache { get { return texturesInCache; } } 97// public long TexturesInCache { get { return texturesInCache; } }
92// 98//
93// /// <value> 99// /// <value>
94// /// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit 100// /// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit
95// /// </value> 101// /// </value>
96// public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } 102// public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
97// 103//
98// /// <value> 104// /// <value>
99// /// Currently unused 105// /// Currently unused
100// /// </value> 106// /// </value>
@@ -121,7 +127,7 @@ namespace OpenSim.Framework.Monitoring
121 public float PendingUploads { get { return pendingUploads; } } 127 public float PendingUploads { get { return pendingUploads; } }
122 public float ActiveScripts { get { return activeScripts; } } 128 public float ActiveScripts { get { return activeScripts; } }
123 public float ScriptLinesPerSecond { get { return scriptLinesPerSecond; } } 129 public float ScriptLinesPerSecond { get { return scriptLinesPerSecond; } }
124 130
125// /// <summary> 131// /// <summary>
126// /// This is the time it took for the last asset request made in response to a cache miss. 132// /// This is the time it took for the last asset request made in response to a cache miss.
127// /// </summary> 133// /// </summary>
@@ -171,7 +177,7 @@ namespace OpenSim.Framework.Monitoring
171// assetsInCache++; 177// assetsInCache++;
172// //assetCacheMemoryUsage += asset.Data.Length; 178// //assetCacheMemoryUsage += asset.Data.Length;
173// } 179// }
174// 180//
175// public void RemoveAsset(UUID uuid) 181// public void RemoveAsset(UUID uuid)
176// { 182// {
177// assetsInCache--; 183// assetsInCache--;
@@ -198,7 +204,7 @@ namespace OpenSim.Framework.Monitoring
198// texturesInCache = 0; 204// texturesInCache = 0;
199// textureCacheMemoryUsage = 0; 205// textureCacheMemoryUsage = 0;
200// } 206// }
201// 207//
202// public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts) 208// public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts)
203// { 209// {
204// assetRequestTimeAfterCacheMiss = ts; 210// assetRequestTimeAfterCacheMiss = ts;
@@ -253,7 +259,7 @@ namespace OpenSim.Framework.Monitoring
253 /// <param name="pack"></param> 259 /// <param name="pack"></param>
254 public void ReceiveClassicSimStatsPacket(SimStats stats) 260 public void ReceiveClassicSimStatsPacket(SimStats stats)
255 { 261 {
256 // FIXME: SimStats shouldn't allow an arbitrary stat packing order (which is inherited from the original 262 // FIXME: SimStats shouldn't allow an arbitrary stat packing order (which is inherited from the original
257 // SimStatsPacket that was being used). 263 // SimStatsPacket that was being used).
258 264
259 // For an unknown reason the original designers decided not to 265 // For an unknown reason the original designers decided not to
@@ -270,8 +276,8 @@ namespace OpenSim.Framework.Monitoring
270 totalFrameTime = stats.StatsBlock[8].StatValue; 276 totalFrameTime = stats.StatsBlock[8].StatValue;
271 netFrameTime = stats.StatsBlock[9].StatValue; 277 netFrameTime = stats.StatsBlock[9].StatValue;
272 physicsFrameTime = stats.StatsBlock[10].StatValue; 278 physicsFrameTime = stats.StatsBlock[10].StatValue;
273 otherFrameTime = stats.StatsBlock[11].StatValue; 279 imageFrameTime = stats.StatsBlock[11].StatValue;
274 imageFrameTime = stats.StatsBlock[12].StatValue; 280 otherFrameTime = stats.StatsBlock[12].StatValue;
275 inPacketsPerSecond = stats.StatsBlock[13].StatValue; 281 inPacketsPerSecond = stats.StatsBlock[13].StatValue;
276 outPacketsPerSecond = stats.StatsBlock[14].StatValue; 282 outPacketsPerSecond = stats.StatsBlock[14].StatValue;
277 unackedBytes = stats.StatsBlock[15].StatValue; 283 unackedBytes = stats.StatsBlock[15].StatValue;
@@ -279,12 +285,16 @@ namespace OpenSim.Framework.Monitoring
279 pendingDownloads = stats.StatsBlock[17].StatValue; 285 pendingDownloads = stats.StatsBlock[17].StatValue;
280 pendingUploads = stats.StatsBlock[18].StatValue; 286 pendingUploads = stats.StatsBlock[18].StatValue;
281 activeScripts = stats.StatsBlock[19].StatValue; 287 activeScripts = stats.StatsBlock[19].StatValue;
282 scriptLinesPerSecond = stats.StatsBlock[20].StatValue; 288 sleepTime = stats.StatsBlock[20].StatValue;
283 m_frameDilation = stats.StatsBlock[22].StatValue; 289 spareTime = stats.StatsBlock[21].StatValue;
284 m_usersLoggingIn = stats.StatsBlock[23].StatValue; 290 physicsStep = stats.StatsBlock[22].StatValue;
285 m_totalGeoPrims = stats.StatsBlock[24].StatValue; 291
286 m_totalMeshes = stats.StatsBlock[25].StatValue; 292 scriptLinesPerSecond = stats.ExtraStatsBlock[0].StatValue;
287 m_inUseThreads = stats.StatsBlock[26].StatValue; 293 m_frameDilation = stats.ExtraStatsBlock[1].StatValue;
294 m_usersLoggingIn = stats.ExtraStatsBlock[2].StatValue;
295 m_totalGeoPrims = stats.ExtraStatsBlock[3].StatValue;
296 m_totalMeshes = stats.ExtraStatsBlock[4].StatValue;
297 m_inUseThreads = stats.ExtraStatsBlock[5].StatValue;
288 } 298 }
289 299
290 /// <summary> 300 /// <summary>
@@ -296,7 +306,7 @@ namespace OpenSim.Framework.Monitoring
296 StringBuilder sb = new StringBuilder(Environment.NewLine); 306 StringBuilder sb = new StringBuilder(Environment.NewLine);
297// sb.Append("ASSET STATISTICS"); 307// sb.Append("ASSET STATISTICS");
298// sb.Append(Environment.NewLine); 308// sb.Append(Environment.NewLine);
299 309
300 /* 310 /*
301 sb.Append( 311 sb.Append(
302 string.Format( 312 string.Format(
@@ -332,7 +342,7 @@ Asset service request failures: {3}" + Environment.NewLine,
332 List<Stat> stats = StatsManager.GetStatsFromEachContainer("clientstack", "ClientLogoutsDueToNoReceives"); 342 List<Stat> stats = StatsManager.GetStatsFromEachContainer("clientstack", "ClientLogoutsDueToNoReceives");
333 343
334 sb.AppendFormat( 344 sb.AppendFormat(
335 "Client logouts due to no data receive timeout: {0}\n\n", 345 "Client logouts due to no data receive timeout: {0}\n\n",
336 stats != null ? stats.Sum(s => s.Value).ToString() : "unknown"); 346 stats != null ? stats.Sum(s => s.Value).ToString() : "unknown");
337 347
338// sb.Append(Environment.NewLine); 348// sb.Append(Environment.NewLine);
@@ -433,10 +443,10 @@ Asset service request failures: {3}" + Environment.NewLine,
433 foreach (ProcessThread currentThread in 443 foreach (ProcessThread currentThread in
434 Process.GetCurrentProcess().Threads) 444 Process.GetCurrentProcess().Threads)
435 { 445 {
436 // A known issue with the current process .Threads property is 446 // A known issue with the current process .Threads property is
437 // that it can return null threads, thus don't count those as 447 // that it can return null threads, thus don't count those as
438 // running threads and prevent the program function from failing 448 // running threads and prevent the program function from failing
439 if (currentThread != null && 449 if (currentThread != null &&
440 currentThread.ThreadState == ThreadState.Running) 450 currentThread.ThreadState == ThreadState.Running)
441 { 451 {
442 numberThreadsRunning++; 452 numberThreadsRunning++;
@@ -495,7 +505,7 @@ Asset service request failures: {3}" + Environment.NewLine,
495 "{0:0.##}", numberThreadsRunning)); 505 "{0:0.##}", numberThreadsRunning));
496 args["ProcMem"] = OSD.FromString(String.Format("{0:#,###,###.##}", 506 args["ProcMem"] = OSD.FromString(String.Format("{0:#,###,###.##}",
497 memUsage)); 507 memUsage));
498 508
499 return args; 509 return args;
500 } 510 }
501 } 511 }
@@ -521,12 +531,12 @@ Asset service request failures: {3}" + Environment.NewLine,
521 { 531 {
522 return m_statsProvider.GetStats(); 532 return m_statsProvider.GetStats();
523 } 533 }
524 534
525 public string XReport(string uptime, string version) 535 public string XReport(string uptime, string version)
526 { 536 {
527 return ""; 537 return "";
528 } 538 }
529 539
530 public OSDMap OReport(string uptime, string version) 540 public OSDMap OReport(string uptime, string version)
531 { 541 {
532 OSDMap ret = new OSDMap(); 542 OSDMap ret = new OSDMap();