diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-05-22 16:54:22 -0500 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2018-05-22 16:54:22 -0500 |
commit | 071206304d088aac8bd0e2fff600141dae1d09b6 (patch) | |
tree | a7626478e5ce158c04cce0ade26e046eec3c16ca /synapse/util/caches/__init__.py | |
parent | tests/metrics is gone now (diff) | |
download | synapse-071206304d088aac8bd0e2fff600141dae1d09b6.tar.xz |
cleanup pep8 errors
Diffstat (limited to 'synapse/util/caches/__init__.py')
-rw-r--r-- | synapse/util/caches/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/util/caches/__init__.py b/synapse/util/caches/__init__.py index 1c511a7072..e0c22df249 100644 --- a/synapse/util/caches/__init__.py +++ b/synapse/util/caches/__init__.py @@ -29,13 +29,16 @@ cache_total = Gauge("synapse_util_caches_cache:total", "", ["name"]) response_cache_size = Gauge("synapse_util_caches_response_cache:size", "", ["name"]) response_cache_hits = Gauge("synapse_util_caches_response_cache:hits", "", ["name"]) -response_cache_evicted = Gauge("synapse_util_caches_response_cache:evicted_size", "", ["name"]) +response_cache_evicted = Gauge( + "synapse_util_caches_response_cache:evicted_size", "", ["name"] +) response_cache_total = Gauge("synapse_util_caches_response_cache:total", "", ["name"]) + def register_cache(cache_type, cache_name, cache): # Check if the metric is already registered. Unregister it, if so. - metric_name = "cache_%s_%s" % (cache_type, cache_name,) + metric_name = "cache_%s_%s" % (cache_type, cache_name) if metric_name in collectors_by_name.keys(): REGISTRY.unregister(collectors_by_name[metric_name]) |