From b6b184c740d19cd27361efa6056bad6d517af7e2 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 22 Mar 2023 20:12:02 +0100 Subject: [PATCH] gitsrht-periodic: drop unsupported timer This uses an unstable/undocumented part of the Prometheus Python interface. --- gitsrht-periodic | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gitsrht-periodic b/gitsrht-periodic index ef92ede..d1582e3 100755 --- a/gitsrht-periodic +++ b/gitsrht-periodic @@ -42,9 +42,6 @@ def gc_git(): "Packfile size in the gc_git job (B)", ["stage"], registry=registry) - gt = Gauge("gitsrht_periodic_gc_git_time", - "Time spent GCing repositories by the gc_git job", - registry=registry) repos = (Repository.query .offset(random.randrange(0, repo_count + 1 - limit)) @@ -53,7 +50,6 @@ def gc_git(): ps.labels("pre").inc(sum(map(lambda p: p.stat().st_size, os.scandir(os.path.join(r.path, "objects", "pack"))))) - @Timer(gt.inc) def gc(): subprocess.run(["git", "-C", r.path, "gc", "--quiet"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) -- 2.38.4