Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix prometheus metrics being negative (mixed up start/end)
Browse files Browse the repository at this point in the history
  • Loading branch information
MadLittleMods committed Aug 22, 2022
1 parent 2c42673 commit f7ce80a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion synapse/handlers/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ async def try_backfill(domains: List[str]) -> bool:

processing_end_time = self.clock.time_msec()
backfill_processing_before_timer.observe(
(processing_start_time - processing_end_time) / 1000
(processing_end_time - processing_start_time) / 1000
)

success = await try_backfill(likely_domains)
Expand Down
2 changes: 1 addition & 1 deletion synapse/rest/client/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ async def on_GET(
room_member_count = await make_deferred_yieldable(room_member_count_deferred)
messsages_response_timer.labels(
room_size=_RoomSize.from_member_count(room_member_count)
).observe((processing_start_time - processing_end_time) / 1000)
).observe((processing_end_time - processing_start_time) / 1000)

return 200, msgs

Expand Down

0 comments on commit f7ce80a

Please sign in to comment.