aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs b/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs
index ae7aaf2..d4a1ec3 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs
@@ -26,11 +26,16 @@
26 */ 26 */
27 27
28using System; 28using System;
29using OpenSim.Framework.Monitoring;
29 30
30namespace OpenSim.Framework.Servers.HttpServer 31namespace OpenSim.Framework.Servers.HttpServer
31{ 32{
32 public abstract class BaseRequestHandler 33 public abstract class BaseRequestHandler
33 { 34 {
35 public int RequestsReceived { get; protected set; }
36
37 public int RequestsHandled { get; protected set; }
38
34 public virtual string ContentType 39 public virtual string ContentType
35 { 40 {
36 get { return "application/xml"; } 41 get { return "application/xml"; }
@@ -57,6 +62,24 @@ namespace OpenSim.Framework.Servers.HttpServer
57 Description = description; 62 Description = description;
58 m_httpMethod = httpMethod; 63 m_httpMethod = httpMethod;
59 m_path = path; 64 m_path = path;
65
66 // FIXME: A very temporary measure to stop the simulator stats being overwhelmed with user CAPS info.
67 // Needs to be fixed properly in stats display
68 if (!path.StartsWith("/CAPS/"))
69 {
70 StatsManager.RegisterStat(
71 new Stat(
72 "requests",
73 "requests",
74 "Number of requests received by this service endpoint",
75 "requests",
76 "service",
77 string.Format("{0}:{1}", httpMethod, path),
78 StatType.Pull,
79 MeasuresOfInterest.AverageChangeOverTime,
80 s => s.Value = RequestsReceived,
81 StatVerbosity.Debug));
82 }
60 } 83 }
61 84
62 public virtual string Path 85 public virtual string Path