element-synapse/synapse/metrics
Erik Johnston 1bddd25a85
Port Clock functions to use Duration class (#19229)
This changes the arguments in clock functions to be `Duration` and
converts call sites and constants into `Duration`. There are still some
more functions around that should be converted (e.g.
`timeout_deferred`), but we leave that to another PR.

We also changes `.as_secs()` to return a float, as the rounding broke
things subtly. The only reason to keep it (its the same as
`timedelta.total_seconds()`) is for symmetry with `as_millis()`.

Follows on from https://github.com/element-hq/synapse/pull/19223
2025-12-01 13:55:06 +00:00
..
__init__.py Write union types as X | Y where possible (#19111) 2025-11-06 14:02:33 -06:00
_gc.py Cleanly shutdown SynapseHomeServer object (#18828) 2025-10-01 02:42:09 +00:00
_reactor_metrics.py Update metrics linting to be able to handle custom metrics (#18733) 2025-08-01 15:34:11 -05:00
_types.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
background_process_metrics.py Write union types as X | Y where possible (#19111) 2025-11-06 14:02:33 -06:00
common_usage_metrics.py Port Clock functions to use Duration class (#19229) 2025-12-01 13:55:06 +00:00
jemalloc.py Write union types as X | Y where possible (#19111) 2025-11-06 14:02:33 -06:00