mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-01-24 03:31:00 -05:00
appease pep8
This commit is contained in:
parent
b202531be6
commit
5663137e03
@ -143,6 +143,7 @@ TYPES = {
|
|||||||
stat.S_IFIFO: "FIFO",
|
stat.S_IFIFO: "FIFO",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def update_resource_metrics():
|
def update_resource_metrics():
|
||||||
global rusage
|
global rusage
|
||||||
rusage = getrusage(RUSAGE_SELF)
|
rusage = getrusage(RUSAGE_SELF)
|
||||||
@ -183,7 +184,7 @@ def _process_fds():
|
|||||||
return counts
|
return counts
|
||||||
|
|
||||||
|
|
||||||
## Legacy synapse-invented metric names
|
# Legacy synapse-invented metric names
|
||||||
|
|
||||||
resource_metrics = get_metrics_for("process.resource")
|
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"])
|
get_metrics_for("process").register_callback("fds", _process_fds, labels=["type"])
|
||||||
|
|
||||||
## New prometheus-standard metric names
|
# New prometheus-standard metric names
|
||||||
process_metrics = get_metrics_for("process");
|
|
||||||
|
process_metrics = get_metrics_for("process")
|
||||||
|
|
||||||
if HAVE_PROC_SELF_STAT:
|
if HAVE_PROC_SELF_STAT:
|
||||||
process_metrics.register_callback(
|
process_metrics.register_callback(
|
||||||
|
Loading…
Reference in New Issue
Block a user