summary refs log tree commit diff
path: root/synapse/util/wheel_timer.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-02-19 09:50:54 +0000
committerErik Johnston <erik@matrix.org>2016-02-19 09:50:54 +0000
commit5614b4dafb2e1dd59fac55fe4e8b29cd4bc3e785 (patch)
tree944b888e8148b9989d82fbecc8d49e50651f70b5 /synapse/util/wheel_timer.py
parent"You are not..." (diff)
downloadsynapse-5614b4dafb2e1dd59fac55fe4e8b29cd4bc3e785.tar.xz
Add presence metrics
Diffstat (limited to 'synapse/util/wheel_timer.py')
-rw-r--r--synapse/util/wheel_timer.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/util/wheel_timer.py b/synapse/util/wheel_timer.py
index 2c9f957616..7412fc57a4 100644
--- a/synapse/util/wheel_timer.py
+++ b/synapse/util/wheel_timer.py
@@ -89,3 +89,9 @@ class WheelTimer(object):
             ret.extend(self.entries.pop(0).queue)
 
         return ret
+
+    def __len__(self):
+        l = 0
+        for entry in self.entries:
+            l += len(entry.queue)
+        return l