mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-31 11:48:55 +01:00
Merge pull request #852 from matrix-org/erikj/gc_metrics
Add GC counts to metrics
This commit is contained in:
commit
02270b4b3d
1 changed files with 4 additions and 0 deletions
|
@ -156,6 +156,10 @@ pending_calls_metric = reactor_metrics.register_distribution("pending_calls")
|
||||||
gc_time = reactor_metrics.register_distribution("gc_time", labels=["gen"])
|
gc_time = reactor_metrics.register_distribution("gc_time", labels=["gen"])
|
||||||
gc_unreachable = reactor_metrics.register_counter("gc_unreachable", labels=["gen"])
|
gc_unreachable = reactor_metrics.register_counter("gc_unreachable", labels=["gen"])
|
||||||
|
|
||||||
|
reactor_metrics.register_callback(
|
||||||
|
"gc_counts", lambda: {(i,): v for i, v in enumerate(gc.get_count())}, labels=["gen"]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def runUntilCurrentTimer(func):
|
def runUntilCurrentTimer(func):
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue