Add Measure block for persist_events

This seems like a useful thing to measure.
pull/2975/head
Richard van der Hoff 2018-03-13 09:57:54 +00:00
parent d65ceb4b48
commit 889a2a853a
1 changed files with 5 additions and 4 deletions

View File

@ -283,6 +283,7 @@ class EventsStore(EventsWorkerStore):
def _maybe_start_persisting(self, room_id): def _maybe_start_persisting(self, room_id):
@defer.inlineCallbacks @defer.inlineCallbacks
def persisting_queue(item): def persisting_queue(item):
with Measure(self._clock, "persist_events"):
yield self._persist_events( yield self._persist_events(
item.events_and_contexts, item.events_and_contexts,
backfilled=item.backfilled, backfilled=item.backfilled,