mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-21 02:34:18 -05:00
Measure http.server render
This commit is contained in:
parent
47dd8f02a1
commit
39b900b316
@ -19,6 +19,7 @@ from synapse.api.errors import (
|
|||||||
)
|
)
|
||||||
from synapse.util.logcontext import LoggingContext, PreserveLoggingContext
|
from synapse.util.logcontext import LoggingContext, PreserveLoggingContext
|
||||||
from synapse.util.caches import intern_dict
|
from synapse.util.caches import intern_dict
|
||||||
|
from synapse.util.metrics import Measure
|
||||||
import synapse.metrics
|
import synapse.metrics
|
||||||
import synapse.events
|
import synapse.events
|
||||||
|
|
||||||
@ -234,6 +235,7 @@ class JsonResource(HttpServer, resource.Resource):
|
|||||||
request_metrics = RequestMetrics()
|
request_metrics = RequestMetrics()
|
||||||
request_metrics.start(self.clock)
|
request_metrics.start(self.clock)
|
||||||
|
|
||||||
|
with Measure(self.clock, "http.render"):
|
||||||
# Loop through all the registered callbacks to check if the method
|
# Loop through all the registered callbacks to check if the method
|
||||||
# and path regex match
|
# and path regex match
|
||||||
for path_entry in self.path_regexs.get(request.method, []):
|
for path_entry in self.path_regexs.get(request.method, []):
|
||||||
|
Loading…
Reference in New Issue
Block a user