Merge pull request #3590 from matrix-org/rav/persist_events_metrics
Add some measure blocks to persist_eventspull/3598/merge
commit
2601ee28bd
|
@ -0,0 +1 @@
|
||||||
|
Add some measure blocks to persist_events
|
|
@ -417,19 +417,29 @@ class EventsStore(EventsWorkerStore):
|
||||||
logger.info(
|
logger.info(
|
||||||
"Calculating state delta for room %s", room_id,
|
"Calculating state delta for room %s", room_id,
|
||||||
)
|
)
|
||||||
current_state = yield self._get_new_state_after_events(
|
|
||||||
room_id,
|
with Measure(
|
||||||
ev_ctx_rm,
|
self._clock,
|
||||||
latest_event_ids,
|
"persist_events.get_new_state_after_events",
|
||||||
new_latest_event_ids,
|
):
|
||||||
)
|
current_state = yield self._get_new_state_after_events(
|
||||||
|
room_id,
|
||||||
|
ev_ctx_rm,
|
||||||
|
latest_event_ids,
|
||||||
|
new_latest_event_ids,
|
||||||
|
)
|
||||||
|
|
||||||
if current_state is not None:
|
if current_state is not None:
|
||||||
current_state_for_room[room_id] = current_state
|
current_state_for_room[room_id] = current_state
|
||||||
delta = yield self._calculate_state_delta(
|
with Measure(
|
||||||
room_id, current_state,
|
self._clock,
|
||||||
)
|
"persist_events.calculate_state_delta",
|
||||||
if delta is not None:
|
):
|
||||||
state_delta_for_room[room_id] = delta
|
delta = yield self._calculate_state_delta(
|
||||||
|
room_id, current_state,
|
||||||
|
)
|
||||||
|
if delta is not None:
|
||||||
|
state_delta_for_room[room_id] = delta
|
||||||
|
|
||||||
yield self.runInteraction(
|
yield self.runInteraction(
|
||||||
"persist_events",
|
"persist_events",
|
||||||
|
|
Loading…
Reference in New Issue