summary refs log tree commit diff
path: root/synapse/util/metrics.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix typing for notifier (#8064)Erik Johnston2020-08-121-3/+6
|
* Convert some util functions to async (#8035)Patrick Cloke2020-08-061-18/+21
|
* Clean up some LoggingContext stuff (#7120)Richard van der Hoff2020-03-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * Pull Sentinel out of LoggingContext ... and drop a few unnecessary references to it * Factor out LoggingContext.current_context move `current_context` and `set_context` out to top-level functions. Mostly this means that I can more easily trace what's actually referring to LoggingContext, but I think it's generally neater. * move copy-to-parent into `stop` this really just makes `start` and `stop` more symetric. It also means that it behaves correctly if you manually `set_log_context` rather than using the context manager. * Replace `LoggingContext.alive` with `finished` Turn `alive` into `finished` and make it a bit better defined.
* Fix inaccurate per-block metrics (#6491)Richard van der Hoff2019-12-091-42/+18
| | | | | `Measure` incorrectly assumed that it was the only thing being done by the parent `LoggingContext`. For instance, during a "renew group attestations" operation, hundreds of `outbound_request` calls could take place in parallel, all using the same `LoggingContext`. This would mean that any resources used during *any* of those calls would be reported against *all* of them, producing wildly inaccurate results. Instead, we now give each `Measure` block its own `LoggingContext` (using the parent `LoggingContext` mechanism to ensure that the log lines look correct and that the metrics are ultimately propogated to the top level for reporting against requests/backgrond tasks).
* Port SyncHandler to async/awaitErik Johnston2019-12-051-6/+17
|
* Remove usage of deprecated logger.warn method from codebase (#6271)Andrew Morgan2019-10-311-3/+3
| | | Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated.
* add some metrics on the federation sender (#6160)Richard van der Hoff2019-10-031-2/+4
|
* Replace returnValue with return (#5736)Amber Brown2019-07-231-1/+1
|
* Move logging utilities out of the side drawer of util/ and into logging/ (#5606)Amber Brown2019-07-041-1/+1
|
* Run Black. (#5482)Amber Brown2019-06-201-10/+22
|
* Add in flight real time metrics for Measure blocksErik Johnston2018-09-141-0/+22
|
* Don't spew errors because we can't save metrics (#3563)Amber Brown2018-07-191-6/+13
|
* Refactor logcontext resource usage tracking (#3501)Richard van der Hoff2018-07-101-16/+9
| | | | | Factor out the resource usage tracking out to a separate object, which can be passed around and copied independently of the logcontext itself.
* run isortAmber Brown2018-07-091-4/+4
|
* fix up testsAmber Brown2018-05-281-3/+3
|
* update to more consistently use seconds in any metrics or loggingAmber Brown2018-05-281-4/+4
|
* cleanupAmber Brown2018-05-221-5/+10
|
* replacing portionsAmber Brown2018-05-211-71/+20
|
* Revert "Merge pull request #3066 from matrix-org/rav/remove_redundant_metrics"Richard van der Hoff2018-04-091-0/+25
| | | | | | | We aren't ready to release this yet, so I'm reverting it for now. This reverts commit d1679a4ed7947b0814e0f2af9b888a16c588f1a1, reversing changes made to e089100c6231541c446e37e157dec8feed02d283.
* Remove redundant metrics which were deprecated in 0.27.0.Richard van der Hoff2018-04-041-25/+0
|
* Fix bugs in block metricsRichard van der Hoff2018-01-181-2/+4
| | | | ... which I introduced in #2785
* Track DB scheduling delay per-requestRichard van der Hoff2018-01-161-1/+13
| | | | | | For each request, track the amount of time spent waiting for a db connection. This entails adding it to the LoggingContext and we may as well add metrics for it while we are passing.
* Track db txn time in millisecsRichard van der Hoff2018-01-161-3/+5
| | | | ... to reduce the amount of floating-point foo we do.
* Reorganise request and block metricsRichard van der Hoff2018-01-151-11/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to circumvent the number of duplicate foo:count metrics increasing without bounds, it's time for a rearrangement. The following are all deprecated, and replaced with synapse_util_metrics_block_count: synapse_util_metrics_block_timer:count synapse_util_metrics_block_ru_utime:count synapse_util_metrics_block_ru_stime:count synapse_util_metrics_block_db_txn_count:count synapse_util_metrics_block_db_txn_duration:count The following are all deprecated, and replaced with synapse_http_server_response_count: synapse_http_server_requests synapse_http_server_response_time:count synapse_http_server_response_ru_utime:count synapse_http_server_response_ru_stime:count synapse_http_server_response_db_txn_count:count synapse_http_server_response_db_txn_duration:count The following are renamed (the old metrics are kept for now, but deprecated): synapse_util_metrics_block_timer:total -> synapse_util_metrics_block_time_seconds synapse_util_metrics_block_ru_utime:total -> synapse_util_metrics_block_ru_utime_seconds synapse_util_metrics_block_ru_stime:total -> synapse_util_metrics_block_ru_stime_seconds synapse_util_metrics_block_db_txn_count:total -> synapse_util_metrics_block_db_txn_count synapse_util_metrics_block_db_txn_duration:total -> synapse_util_metrics_block_db_txn_duration_seconds synapse_http_server_response_time:total -> synapse_http_server_response_time_seconds synapse_http_server_response_ru_utime:total -> synapse_http_server_response_ru_utime_seconds synapse_http_server_response_ru_stime:total -> synapse_http_server_response_ru_stime_seconds synapse_http_server_response_db_txn_count:total -> synapse_http_server_response_db_txn_count synapse_http_server_response_db_txn_duration:total synapse_http_server_response_db_txn_duration_seconds
* Only abort Measure on ExceptionsErik Johnston2016-08-191-1/+1
|
* Clean up TransactionQueueErik Johnston2016-08-101-2/+1
|
* Measure federation send transaction resourcesErik Johnston2016-08-101-0/+14
|
* typoMatthew Hodgson2016-07-261-1/+1
|
* Create log context in Measure if one doesn't existErik Johnston2016-04-181-6/+17
|
* Fix unit testsErik Johnston2016-02-091-4/+5
|
* Don't create new logging contextErik Johnston2016-02-091-12/+15
|
* Fix bug in util.metrics.MeasureErik Johnston2016-02-091-1/+3
|
* Create new context when measuringErik Johnston2016-02-091-2/+5
|
* Fix up logcontextsErik Johnston2016-02-081-4/+6
|
* Add metrics to pushersErik Johnston2016-02-081-0/+86