Record some more GC metrics

This commit is contained in:
Erik Johnston 2016-06-07 16:51:01 +01:00
parent b01e71e719
commit 18f0cc7d99
1 changed files with 5 additions and 0 deletions

View File

@ -156,6 +156,11 @@ pending_calls_metric = reactor_metrics.register_distribution("pending_calls")
gc_time = reactor_metrics.register_distribution("gc_time", labels=["gen"])
gc_unreachable = reactor_metrics.register_counter("gc_unreachable", labels=["gen"])
reactor_metrics.register_callback("gc_total_objects", lambda: len(gc.get_objects()))
reactor_metrics.register_callback(
"gc_counts", lambda: {(i,): v for i, v in enumerate(gc.get_count())}, labels=["gen"]
)
def runUntilCurrentTimer(func):