diff options
author | Erik Johnston <erik@matrix.org> | 2016-02-19 09:50:54 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-02-19 09:50:54 +0000 |
commit | 5614b4dafb2e1dd59fac55fe4e8b29cd4bc3e785 (patch) | |
tree | 944b888e8148b9989d82fbecc8d49e50651f70b5 /synapse/util/wheel_timer.py | |
parent | "You are not..." (diff) | |
download | synapse-5614b4dafb2e1dd59fac55fe4e8b29cd4bc3e785.tar.xz |
Add presence metrics
Diffstat (limited to '')
-rw-r--r-- | synapse/util/wheel_timer.py | 6 |
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 |