summary refs log tree commit diff
path: root/synapse/http/server.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-08-22 10:18:12 +0100
committerErik Johnston <erik@matrix.org>2016-08-22 10:18:12 +0100
commita093fab253ca0e67d9ae861e5b8cf393ea7783f9 (patch)
treec00d05fc550c2ee6464d278ebfa00c240fad4d4f /synapse/http/server.py
parentAdd a top level measure (diff)
downloadsynapse-a093fab253ca0e67d9ae861e5b8cf393ea7783f9.tar.xz
Use top level measure
Diffstat (limited to '')
-rw-r--r--synapse/http/server.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py
index 2cba13e69f..d2efd9f3e4 100644
--- a/synapse/http/server.py
+++ b/synapse/http/server.py
@@ -222,7 +222,7 @@ class JsonResource(HttpServer, resource.Resource):
     # It does its own metric reporting because _async_render dispatches to
     # a callback and it's the class name of that callback we want to report
     # against rather than the JsonResource itself.
-    @request_handler(report_metrics=False)
+    @request_handler()
     @defer.inlineCallbacks
     def _async_render(self, request):
         """ This gets called from render() every time someone sends us a request.
@@ -233,9 +233,6 @@ class JsonResource(HttpServer, resource.Resource):
             self._send_response(request, 200, {})
             return
 
-        request_metrics = RequestMetrics()
-        request_metrics.start(self.clock)
-
         # Loop through all the registered callbacks to check if the method
         # and path regex match
         for path_entry in self.path_regexs.get(request.method, []):
@@ -249,12 +246,6 @@ class JsonResource(HttpServer, resource.Resource):
 
             callback = path_entry.callback
 
-            servlet_instance = getattr(callback, "__self__", None)
-            if servlet_instance is not None:
-                servlet_classname = servlet_instance.__class__.__name__
-            else:
-                servlet_classname = "%r" % callback
-
             kwargs = intern_dict({
                 name: urllib.unquote(value).decode("UTF-8") if value else value
                 for name, value in m.groupdict().items()
@@ -265,11 +256,6 @@ class JsonResource(HttpServer, resource.Resource):
                 code, response = callback_return
                 self._send_response(request, code, response)
 
-            try:
-                request_metrics.stop(self.clock, request, servlet_classname)
-            except:
-                pass
-
             return
 
         # Huh. No one wanted to handle that? Fiiiiiine. Send 400.