summary refs log tree commit diff
path: root/synapse/metrics/_reactor_metrics.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update type annotations for compatiblity with prometheus_client 0.14 (#12389)Richard van der Hoff2022-04-061-1/+3
| | | | | | | Principally, `prometheus_client.REGISTRY.register` now requires its argument to extend `prometheus_client.Collector`. Additionally, `Gauge.set` is now annotated so that passing `Optional[int]` causes an error.
* Fix mypy for platforms without epoll support. (#11771)Patrick Cloke2022-01-191-2/+2
|
* Improve `reactor_tick_time` metric (#11724)Richard van der Hoff2022-01-171-0/+83
The existing implementation of the `python_twisted_reactor_tick_time` metric is pretty useless, because it *only* measures the time taken to execute timed calls and callbacks from threads. That neglects everything that happens off the back of I/O, which is obviously quite a lot for us. To improve this, I've hooked into a different place in the reactor - in particular, where it calls `epoll`. That call is the only place it should wait for something to happen - the rest of the loop *should* be quick. I've also removed `python_twisted_reactor_pending_calls`, because I don't believe anyone ever looks at it, and it's a nuisance to populate.