From 89ac1fa8ba55c6cbb4f1888e0542d106209d9c2a Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Tue, 10 Mar 2015 18:06:24 +0000 Subject: Add a counter to track total number of events served by the notifier --- synapse/notifier.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/synapse/notifier.py b/synapse/notifier.py index 75e8152d03..88873d4534 100644 --- a/synapse/notifier.py +++ b/synapse/notifier.py @@ -28,6 +28,8 @@ logger = logging.getLogger(__name__) metrics = synapse.metrics.get_metrics_for(__name__) +notified_events_counter = metrics.register_counter("notified_events") + # TODO(paul): Should be shared somewhere def count(func, l): @@ -72,6 +74,7 @@ class _NotificationListener(object): try: self.deferred.callback(result) + notified_events_counter.inc_by(len(events)) except defer.AlreadyCalledError: pass -- cgit 1.4.1