summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2016-10-19 16:09:42 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2016-10-19 16:09:42 +0100
commit5663137e0323a295585ac4843cd86f422457df07 (patch)
tree137419f71aff991fa35d921d48f41a3cd9e53c3a
parentAlso guard /proc/self/fds-related code with a suitable psuedoconstant (diff)
downloadsynapse-5663137e0323a295585ac4843cd86f422457df07.tar.xz
appease pep8
-rw-r--r--synapse/metrics/__init__.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py

index 081f3aa3d8..ea8219a77c 100644 --- a/synapse/metrics/__init__.py +++ b/synapse/metrics/__init__.py
@@ -143,6 +143,7 @@ TYPES = { stat.S_IFIFO: "FIFO", } + def update_resource_metrics(): global rusage rusage = getrusage(RUSAGE_SELF) @@ -183,7 +184,7 @@ def _process_fds(): return counts -## Legacy synapse-invented metric names +# Legacy synapse-invented metric names resource_metrics = get_metrics_for("process.resource") @@ -196,8 +197,9 @@ resource_metrics.register_callback("maxrss", lambda: rusage.ru_maxrss * 1024) get_metrics_for("process").register_callback("fds", _process_fds, labels=["type"]) -## New prometheus-standard metric names -process_metrics = get_metrics_for("process"); +# New prometheus-standard metric names + +process_metrics = get_metrics_for("process") if HAVE_PROC_SELF_STAT: process_metrics.register_callback(