diff options
author | Justin Clark-Casey (justincc) | 2013-07-08 22:03:07 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-07-08 22:03:07 +0100 |
commit | e19defde36ddbd5ff90d8304c6fe3b57110f8078 (patch) | |
tree | 63b349551f341f00a8a9c598a76343d7b453c328 /OpenSim/Region/Application/OpenSimBase.cs | |
parent | Make dictionary read/write locking consistent in CapabilitiesModule, rename t... (diff) | |
download | opensim-SC-e19defde36ddbd5ff90d8304c6fe3b57110f8078.zip opensim-SC-e19defde36ddbd5ff90d8304c6fe3b57110f8078.tar.gz opensim-SC-e19defde36ddbd5ff90d8304c6fe3b57110f8078.tar.bz2 opensim-SC-e19defde36ddbd5ff90d8304c6fe3b57110f8078.tar.xz |
Add "show caps stats by user" and "show caps stats by cap" console commands to print various counts of capability invocation by user and by cap
This currently prints caps requests received and handled, so that overload of received compared to handled or deadlock can be detected.
This involves making BaseStreamHandler and BaseOutputStream record the ints, which means inheritors should subclass ProcessRequest() instead of Handle()
However, existing inheriting classes overriding Handle() will still work, albeit without stats recording.
"show caps" becomes "show caps list" to disambiguate between show caps commands
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 841069c..f0c088a 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -766,7 +766,7 @@ namespace OpenSim | |||
766 | { | 766 | { |
767 | public SimStatusHandler() : base("GET", "/simstatus", "SimStatus", "Simulator Status") {} | 767 | public SimStatusHandler() : base("GET", "/simstatus", "SimStatus", "Simulator Status") {} |
768 | 768 | ||
769 | public override byte[] Handle(string path, Stream request, | 769 | protected override byte[] ProcessRequest(string path, Stream request, |
770 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 770 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
771 | { | 771 | { |
772 | return Util.UTF8.GetBytes("OK"); | 772 | return Util.UTF8.GetBytes("OK"); |
@@ -792,7 +792,7 @@ namespace OpenSim | |||
792 | m_opensim = sim; | 792 | m_opensim = sim; |
793 | } | 793 | } |
794 | 794 | ||
795 | public override byte[] Handle(string path, Stream request, | 795 | protected override byte[] ProcessRequest(string path, Stream request, |
796 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 796 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
797 | { | 797 | { |
798 | return Util.UTF8.GetBytes(m_opensim.StatReport(httpRequest)); | 798 | return Util.UTF8.GetBytes(m_opensim.StatReport(httpRequest)); |
@@ -810,7 +810,7 @@ namespace OpenSim | |||
810 | /// If the request contains a key, "callback" the response will be wrappend in the | 810 | /// If the request contains a key, "callback" the response will be wrappend in the |
811 | /// associated value for jsonp used with ajax/javascript | 811 | /// associated value for jsonp used with ajax/javascript |
812 | /// </summary> | 812 | /// </summary> |
813 | public class UXSimStatusHandler : BaseStreamHandler | 813 | protected class UXSimStatusHandler : BaseStreamHandler |
814 | { | 814 | { |
815 | OpenSimBase m_opensim; | 815 | OpenSimBase m_opensim; |
816 | 816 | ||
@@ -820,7 +820,7 @@ namespace OpenSim | |||
820 | m_opensim = sim; | 820 | m_opensim = sim; |
821 | } | 821 | } |
822 | 822 | ||
823 | public override byte[] Handle(string path, Stream request, | 823 | protected override byte[] ProcessRequest(string path, Stream request, |
824 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 824 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
825 | { | 825 | { |
826 | return Util.UTF8.GetBytes(m_opensim.StatReport(httpRequest)); | 826 | return Util.UTF8.GetBytes(m_opensim.StatReport(httpRequest)); |