Merge pull request #2975 from matrix-org/rav/measure_persist_events

Add Measure block for persist_events
pull/2986/head
Richard van der Hoff 2018-03-13 12:06:25 +00:00 committed by GitHub
commit 299fd740c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -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)