aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs7
-rw-r--r--OpenSim/Framework/Statistics/SimExtraStatsCollector.cs65
-rw-r--r--OpenSim/Framework/Util.cs12
3 files changed, 53 insertions, 31 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index ffa30d5..016ab73 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -319,6 +319,13 @@ namespace OpenSim.Framework.Servers.HttpServer
319 OSHttpRequest req = new OSHttpRequest(context, request); 319 OSHttpRequest req = new OSHttpRequest(context, request);
320 OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context); 320 OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context);
321 HandleRequest(req, resp); 321 HandleRequest(req, resp);
322
323 // !!!HACK ALERT!!!
324 // There seems to be a bug in the underlying http code that makes subsequent requests
325 // come up with trash in Accept headers. Until that gets fixed, we're cleaning them up here.
326 if (request.AcceptTypes != null)
327 for (int i = 0; i < request.AcceptTypes.Length; i++)
328 request.AcceptTypes[i] = string.Empty;
322 } 329 }
323 330
324 // public void ConvertIHttpClientContextToOSHttp(object stateinfo) 331 // public void ConvertIHttpClientContextToOSHttp(object stateinfo)
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
index 3619606..5449757 100644
--- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
+++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
@@ -390,36 +390,41 @@ Asset service request failures: {3}" + Environment.NewLine,
390 public override string XReport(string uptime, string version) 390 public override string XReport(string uptime, string version)
391 { 391 {
392 OSDMap args = new OSDMap(30); 392 OSDMap args = new OSDMap(30);
393 args["AssetsInCache"] = OSD.FromReal(AssetsInCache); 393 args["AssetsInCache"] = OSD.FromString (String.Format ("{0:0.##}", AssetsInCache));
394 args["TimeAfterCacheMiss"] = OSD.FromReal(assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0); 394 args["TimeAfterCacheMiss"] = OSD.FromString (String.Format ("{0:0.##}",
395 args["BlockedMissingTextureRequests"] = OSD.FromReal(BlockedMissingTextureRequests); 395 assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0));
396 args["AssetServiceRequestFailures"] = OSD.FromReal(AssetServiceRequestFailures); 396 args["BlockedMissingTextureRequests"] = OSD.FromString (String.Format ("{0:0.##}",
397 args["abnormalClientThreadTerminations"] = OSD.FromReal(abnormalClientThreadTerminations); 397 BlockedMissingTextureRequests));
398 args["InventoryServiceRetrievalFailures"] = OSD.FromReal(InventoryServiceRetrievalFailures); 398 args["AssetServiceRequestFailures"] = OSD.FromString (String.Format ("{0:0.##}",
399 args["Dilatn"] = OSD.FromReal(timeDilation); 399 AssetServiceRequestFailures));
400 args["SimFPS"] = OSD.FromReal(simFps); 400 args["abnormalClientThreadTerminations"] = OSD.FromString (String.Format ("{0:0.##}",
401 args["PhyFPS"] = OSD.FromReal(physicsFps); 401 abnormalClientThreadTerminations));
402 args["AgntUp"] = OSD.FromReal(agentUpdates); 402 args["InventoryServiceRetrievalFailures"] = OSD.FromString (String.Format ("{0:0.##}",
403 args["RootAg"] = OSD.FromReal(rootAgents); 403 InventoryServiceRetrievalFailures));
404 args["ChldAg"] = OSD.FromReal(childAgents); 404 args["Dilatn"] = OSD.FromString (String.Format ("{0:0.##}", timeDilation));
405 args["Prims"] = OSD.FromReal(totalPrims); 405 args["SimFPS"] = OSD.FromString (String.Format ("{0:0.##}", simFps));
406 args["AtvPrm"] = OSD.FromReal(activePrims); 406 args["PhyFPS"] = OSD.FromString (String.Format ("{0:0.##}", physicsFps));
407 args["AtvScr"] = OSD.FromReal(activeScripts); 407 args["AgntUp"] = OSD.FromString (String.Format ("{0:0.##}", agentUpdates));
408 args["ScrLPS"] = OSD.FromReal(scriptLinesPerSecond); 408 args["RootAg"] = OSD.FromString (String.Format ("{0:0.##}", rootAgents));
409 args["PktsIn"] = OSD.FromReal(inPacketsPerSecond); 409 args["ChldAg"] = OSD.FromString (String.Format ("{0:0.##}", childAgents));
410 args["PktOut"] = OSD.FromReal(outPacketsPerSecond); 410 args["Prims"] = OSD.FromString (String.Format ("{0:0.##}", totalPrims));
411 args["PendDl"] = OSD.FromReal(pendingDownloads); 411 args["AtvPrm"] = OSD.FromString (String.Format ("{0:0.##}", activePrims));
412 args["PendUl"] = OSD.FromReal(pendingUploads); 412 args["AtvScr"] = OSD.FromString (String.Format ("{0:0.##}", activeScripts));
413 args["UnackB"] = OSD.FromReal(unackedBytes); 413 args["ScrLPS"] = OSD.FromString (String.Format ("{0:0.##}", scriptLinesPerSecond));
414 args["TotlFt"] = OSD.FromReal(totalFrameTime); 414 args["PktsIn"] = OSD.FromString (String.Format ("{0:0.##}", inPacketsPerSecond));
415 args["NetFt"] = OSD.FromReal(netFrameTime); 415 args["PktOut"] = OSD.FromString (String.Format ("{0:0.##}", outPacketsPerSecond));
416 args["PhysFt"] = OSD.FromReal(physicsFrameTime); 416 args["PendDl"] = OSD.FromString (String.Format ("{0:0.##}", pendingDownloads));
417 args["OthrFt"] = OSD.FromReal(otherFrameTime); 417 args["PendUl"] = OSD.FromString (String.Format ("{0:0.##}", pendingUploads));
418 args["AgntFt"] = OSD.FromReal(agentFrameTime); 418 args["UnackB"] = OSD.FromString (String.Format ("{0:0.##}", unackedBytes));
419 args["ImgsFt"] = OSD.FromReal(imageFrameTime); 419 args["TotlFt"] = OSD.FromString (String.Format ("{0:0.##}", totalFrameTime));
420 args["Memory"] = OSD.FromString(base.XReport(uptime, version)); 420 args["NetFt"] = OSD.FromString (String.Format ("{0:0.##}", netFrameTime));
421 args["Uptime"] = OSD.FromString(uptime); 421 args["PhysFt"] = OSD.FromString (String.Format ("{0:0.##}", physicsFrameTime));
422 args["Version"] = OSD.FromString(version); 422 args["OthrFt"] = OSD.FromString (String.Format ("{0:0.##}", otherFrameTime));
423 args["AgntFt"] = OSD.FromString (String.Format ("{0:0.##}", agentFrameTime));
424 args["ImgsFt"] = OSD.FromString (String.Format ("{0:0.##}", imageFrameTime));
425 args["Memory"] = OSD.FromString (base.XReport (uptime, version));
426 args["Uptime"] = OSD.FromString (uptime);
427 args["Version"] = OSD.FromString (version);
423 428
424 string strBuffer = ""; 429 string strBuffer = "";
425 strBuffer = OSDParser.SerializeJsonString(args); 430 strBuffer = OSDParser.SerializeJsonString(args);
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index c39fb6f..af5a0ce 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1171,6 +1171,16 @@ namespace OpenSim.Framework
1171 1171
1172 } 1172 }
1173 1173
1174 public static uint ConvertAccessLevelToMaturity(byte maturity)
1175 {
1176 if (maturity <= 13)
1177 return 0;
1178 else if (maturity <= 21)
1179 return 1;
1180 else
1181 return 2;
1182 }
1183
1174 /// <summary> 1184 /// <summary>
1175 /// Produces an OSDMap from its string representation on a stream 1185 /// Produces an OSDMap from its string representation on a stream
1176 /// </summary> 1186 /// </summary>
@@ -1486,4 +1496,4 @@ namespace OpenSim.Framework
1486 } 1496 }
1487 1497
1488 } 1498 }
1489} \ No newline at end of file 1499}