diff options
author | Justin Clark-Casey (justincc) | 2014-07-25 21:15:44 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-07-25 23:00:41 +0100 |
commit | 8c5c9806d7cab87eba899b8d83a4767abacc9873 (patch) | |
tree | 9158f09e566f528f07d267e71bc688ca3d8e56b0 /OpenSim | |
parent | fix comments in physics section of [Startup] to reflect the actual default en... (diff) | |
download | opensim-SC-8c5c9806d7cab87eba899b8d83a4767abacc9873.zip opensim-SC-8c5c9806d7cab87eba899b8d83a4767abacc9873.tar.gz opensim-SC-8c5c9806d7cab87eba899b8d83a4767abacc9873.tar.bz2 opensim-SC-8c5c9806d7cab87eba899b8d83a4767abacc9873.tar.xz |
Add stats for service endpoints using existing data.
For each service endpoint (e.g. posts to the xinventory service), a stat is available which shows the number of requests received and moving average per second
The full name is "service.<http-method>:<path>.requests (e.g. service.POST:/xinventory.requests)
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs b/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs index bbac699..72ffb0e 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using OpenSim.Framework.Monitoring; | ||
29 | 30 | ||
30 | namespace OpenSim.Framework.Servers.HttpServer | 31 | namespace OpenSim.Framework.Servers.HttpServer |
31 | { | 32 | { |
@@ -61,6 +62,19 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
61 | Description = description; | 62 | Description = description; |
62 | m_httpMethod = httpMethod; | 63 | m_httpMethod = httpMethod; |
63 | m_path = path; | 64 | m_path = path; |
65 | |||
66 | StatsManager.RegisterStat( | ||
67 | new Stat( | ||
68 | "requests", | ||
69 | "requests", | ||
70 | "Number of requests received by this service endpoint", | ||
71 | "requests", | ||
72 | "service", | ||
73 | string.Format("{0}:{1}", httpMethod, path), | ||
74 | StatType.Pull, | ||
75 | MeasuresOfInterest.AverageChangeOverTime, | ||
76 | s => s.Value = RequestsReceived, | ||
77 | StatVerbosity.Debug)); | ||
64 | } | 78 | } |
65 | 79 | ||
66 | public virtual string Path | 80 | public virtual string Path |