Fix Matrix event handle time metrics (ref #120)

This commit is contained in:
Tulir Asokan
2019-11-30 15:41:47 +02:00
parent 617d44ed75
commit c52df5dc36
2 changed files with 4 additions and 8 deletions
+3 -7
View File
@@ -383,10 +383,6 @@ class MatrixHandler(BaseMatrixHandler):
elif evt.type == EventType.ROOM_TOMBSTONE:
await self.handle_room_upgrade(evt.room_id, evt.sender, evt.content.replacement_room)
# async def handle_event(self, evt: MatrixEvent) -> None:
# if self.filter_matrix_event(evt):
# return
# start_time = time.time()
#
# if EVENT_TIME:
# EVENT_TIME.labels(event_type=evt_type).observe(time.time() - start_time)
async def log_event_handle_duration(self, evt: Event, duration: float) -> None:
if EVENT_TIME:
EVENT_TIME.labels(event_type=str(evt.type)).observe(duration)