aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
diff options
context:
space:
mode:
authorDahlia Trimble2009-04-25 05:06:01 +0000
committerDahlia Trimble2009-04-25 05:06:01 +0000
commit4792e6139a86f2dd93ced34582eef3599b804794 (patch)
tree6aa308eb6d29c94b882051cea5a6fc92224627db /OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
parent* More debug warning message removal in the FreeSwitchVoiceModule (diff)
downloadopensim-SC-4792e6139a86f2dd93ced34582eef3599b804794.zip
opensim-SC-4792e6139a86f2dd93ced34582eef3599b804794.tar.gz
opensim-SC-4792e6139a86f2dd93ced34582eef3599b804794.tar.bz2
opensim-SC-4792e6139a86f2dd93ced34582eef3599b804794.tar.xz
Thanks Bluewall for Mantis #3519: a patch that adds simulator uptime and version to REST/json statistics reporting
Diffstat (limited to 'OpenSim/Framework/Statistics/SimExtraStatsCollector.cs')
-rw-r--r--OpenSim/Framework/Statistics/SimExtraStatsCollector.cs16
1 files changed, 7 insertions, 9 deletions
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
index bab2764..75cc23c 100644
--- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
+++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
@@ -384,12 +384,12 @@ Asset service request failures: {3}" + Environment.NewLine,
384 } 384 }
385 385
386 /// <summary> 386 /// <summary>
387 /// Report back collected statistical information. 387 /// Report back collected statistical information as json serialization.
388 /// </summary> 388 /// </summary>
389 /// <returns></returns> 389 /// <returns></returns>
390 public override string XReport() 390 public override string XReport(string uptime, string version)
391 { 391 {
392 OSDMap args = new OSDMap(28); 392 OSDMap args = new OSDMap(30);
393 args["AssetsInCache"] = OSD.FromReal(AssetsInCache); 393 args["AssetsInCache"] = OSD.FromReal(AssetsInCache);
394 args["TimeAfterCacheMiss"] = OSD.FromReal(assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0); 394 args["TimeAfterCacheMiss"] = OSD.FromReal(assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0);
395 args["BlockedMissingTextureRequests"] = OSD.FromReal(BlockedMissingTextureRequests); 395 args["BlockedMissingTextureRequests"] = OSD.FromReal(BlockedMissingTextureRequests);
@@ -417,14 +417,12 @@ Asset service request failures: {3}" + Environment.NewLine,
417 args["OthrFt"] = OSD.FromReal(otherFrameTime); 417 args["OthrFt"] = OSD.FromReal(otherFrameTime);
418 args["AgntFt"] = OSD.FromReal(agentFrameTime); 418 args["AgntFt"] = OSD.FromReal(agentFrameTime);
419 args["ImgsFt"] = OSD.FromReal(imageFrameTime); 419 args["ImgsFt"] = OSD.FromReal(imageFrameTime);
420 args["Memory"] = OSD.FromString(base.XReport()); 420 args["Memory"] = OSD.FromString(base.XReport(uptime, version));
421 args["Uptime"] = OSD.FromString(uptime);
422 args["Version"] = OSD.FromString(version);
421 423
422 string strBuffer = ""; 424 string strBuffer = "";
423 // byte[] buffer = new byte[1];
424
425 strBuffer = OSDParser.SerializeJsonString(args); 425 strBuffer = OSDParser.SerializeJsonString(args);
426 // UTF8Encoding str = new UTF8Encoding();
427 // buffer = str.GetBytes(strBuffer);
428 426
429 return strBuffer; 427 return strBuffer;
430 } 428 }
@@ -451,7 +449,7 @@ Asset service request failures: {3}" + Environment.NewLine,
451 return m_statsProvider.GetStats(); 449 return m_statsProvider.GetStats();
452 } 450 }
453 451
454 public string XReport() 452 public string XReport(string uptime, string version)
455 { 453 {
456 return ""; 454 return "";
457 } 455 }