summary refs log tree commit diff
path: root/synapse/metrics/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-03-04 10:23:26 +0000
committerErik Johnston <erik@matrix.org>2021-03-04 10:23:26 +0000
commit61a970e25fc5e6dc1036b1bb4702ef8e6e44f419 (patch)
tree16fd89ce0b5b0efa51d29c61723401ee6429beb6 /synapse/metrics/__init__.py
parentMerge remote-tracking branch 'origin/develop' into matrix-org-hotfixes (diff)
parent 1.29.0rc1 (diff)
downloadsynapse-61a970e25fc5e6dc1036b1bb4702ef8e6e44f419.tar.xz
Merge remote-tracking branch 'origin/release-v1.29.0' into matrix-org-hotfixes
Diffstat (limited to 'synapse/metrics/__init__.py')
-rw-r--r--synapse/metrics/__init__.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py

index a8cb49d5b4..3b499efc07 100644 --- a/synapse/metrics/__init__.py +++ b/synapse/metrics/__init__.py
@@ -527,7 +527,7 @@ class ReactorLastSeenMetric: REGISTRY.register(ReactorLastSeenMetric()) -def runUntilCurrentTimer(func): +def runUntilCurrentTimer(reactor, func): @functools.wraps(func) def f(*args, **kwargs): now = reactor.seconds() @@ -590,13 +590,14 @@ def runUntilCurrentTimer(func): try: # Ensure the reactor has all the attributes we expect - reactor.runUntilCurrent - reactor._newTimedCalls - reactor.threadCallQueue + reactor.seconds # type: ignore + reactor.runUntilCurrent # type: ignore + reactor._newTimedCalls # type: ignore + reactor.threadCallQueue # type: ignore # runUntilCurrent is called when we have pending calls. It is called once # per iteratation after fd polling. - reactor.runUntilCurrent = runUntilCurrentTimer(reactor.runUntilCurrent) + reactor.runUntilCurrent = runUntilCurrentTimer(reactor, reactor.runUntilCurrent) # type: ignore # We manually run the GC each reactor tick so that we can get some metrics # about time spent doing GC,