diff options
author | Erik Johnston <erik@matrix.org> | 2016-06-07 16:51:01 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-06-07 16:55:49 +0100 |
commit | 18f0cc7d993408a754e7ff26e9474a969adf762a (patch) | |
tree | 0a0f542a4415d53fb61b8e1f402c00b8f143e742 /synapse/metrics | |
parent | Merge pull request #849 from matrix-org/erikj/gc_threshold (diff) | |
download | synapse-18f0cc7d993408a754e7ff26e9474a969adf762a.tar.xz |
Record some more GC metrics
Diffstat (limited to 'synapse/metrics')
-rw-r--r-- | synapse/metrics/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py index b29cec3de1..8f69aa1ff3 100644 --- a/synapse/metrics/__init__.py +++ b/synapse/metrics/__init__.py @@ -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): |