Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Rename the python-specific metrics now the docs claim that we have done
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul "LeoNerd" Evans committed Nov 3, 2016
1 parent 5219f7e commit 2938a00
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions synapse/metrics/__init__.py
Expand Up @@ -111,18 +111,20 @@ def render_all():
return "\n".join(strs)


reactor_metrics = get_metrics_for("reactor")
tick_time = reactor_metrics.register_distribution("tick_time")
pending_calls_metric = reactor_metrics.register_distribution("pending_calls")
register_process_collector(get_metrics_for("process"))


gc_time = reactor_metrics.register_distribution("gc_time", labels=["gen"])
gc_unreachable = reactor_metrics.register_counter("gc_unreachable", labels=["gen"])
python_metrics = get_metrics_for("python")

reactor_metrics.register_callback(
gc_time = python_metrics.register_distribution("gc_time", labels=["gen"])
gc_unreachable = python_metrics.register_counter("gc_unreachable_total", labels=["gen"])
python_metrics.register_callback(
"gc_counts", lambda: {(i,): v for i, v in enumerate(gc.get_count())}, labels=["gen"]
)

register_process_collector(get_metrics_for("process"))
reactor_metrics = get_metrics_for("python.twisted.reactor")
tick_time = reactor_metrics.register_distribution("tick_time")
pending_calls_metric = reactor_metrics.register_distribution("pending_calls")


def runUntilCurrentTimer(func):
Expand Down

0 comments on commit 2938a00

Please sign in to comment.