summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2018-03-13 12:06:25 +0000
committerGitHub <noreply@github.com>2018-03-13 12:06:25 +0000
commit299fd740c733293dfdfb478e46a050f09bf50032 (patch)
tree79db38fc533bc34c93996b2fd4e96bc35ad3969f
parentMerge pull request #2977 from matrix-org/erikj/replication_move_props (diff)
parentAdd Measure block for persist_events (diff)
downloadsynapse-299fd740c733293dfdfb478e46a050f09bf50032.tar.xz
Merge pull request #2975 from matrix-org/rav/measure_persist_events
Add Measure block for persist_events
-rw-r--r--synapse/storage/events.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index 826fad307e..3890878170 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -283,10 +283,11 @@ class EventsStore(EventsWorkerStore):
     def _maybe_start_persisting(self, room_id):
         @defer.inlineCallbacks
         def persisting_queue(item):
-            yield self._persist_events(
-                item.events_and_contexts,
-                backfilled=item.backfilled,
-            )
+            with Measure(self._clock, "persist_events"):
+                yield self._persist_events(
+                    item.events_and_contexts,
+                    backfilled=item.backfilled,
+                )
 
         self._event_persist_queue.handle_queue(room_id, persisting_queue)