summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-11-08 14:11:39 +0000
committerErik Johnston <erik@matrix.org>2021-11-08 14:11:39 +0000
commitda78f01a641093ee542a9ce2e4e70158d3ad9f29 (patch)
treec92702694895867ef82ea36fe97211050c2304e7
parentMore tracing (diff)
downloadsynapse-da78f01a641093ee542a9ce2e4e70158d3ad9f29.tar.xz
Log slow ticks
-rw-r--r--synapse/metrics/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py
index 91ee5c8193..389d339889 100644
--- a/synapse/metrics/__init__.py
+++ b/synapse/metrics/__init__.py
@@ -606,6 +606,9 @@ def runUntilCurrentTimer(reactor, func):
         ret = func(*args, **kwargs)
         end = time.time()
 
+        if end - start > 0.05:
+            logger.warning("runUntilCurrent took %f seconds", end - start)
+
         # record the amount of wallclock time spent running pending calls.
         # This is a proxy for the actual amount of time between reactor polls,
         # since about 25% of time is actually spent running things triggered by