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)
+1 -1
View File
@@ -32,7 +32,7 @@ setuptools.setup(
install_requires=[
"aiohttp>=3.0.1,<4",
"mautrix>=0.4.0.dev79,<0.5",
"mautrix>=0.4.0.dev80,<0.5",
"SQLAlchemy>=1.2.3,<2",
"alembic>=1.0.0,<2",
"commonmark>=0.8.1,<0.10",