From c6201df9811e77e9deeca56738d918caf239727e Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Fri, 13 May 2022 14:07:02 +0100 Subject: [PATCH] Fix conversions of tick time --- .../cc/tweaked/prometheus/collectors/VanillaCollector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/cc/tweaked/prometheus/collectors/VanillaCollector.java b/common/src/main/java/cc/tweaked/prometheus/collectors/VanillaCollector.java index f75f9db..b079dbf 100644 --- a/common/src/main/java/cc/tweaked/prometheus/collectors/VanillaCollector.java +++ b/common/src/main/java/cc/tweaked/prometheus/collectors/VanillaCollector.java @@ -51,8 +51,8 @@ public static void export(MetricContext context) { totalPlayerCount.set(server.getPlayerCount()); // TODO: This doesn't include the time to run Forge/Fabric hooks! Not sure how to handle that in a generic way. - averageTickTime.set(server.getAverageTickTime() * 1e-9); - tickTime.observe(server.tickTimes[server.getTickCount() % 100] * 1e-9); + averageTickTime.set(server.getAverageTickTime() * 1e-3); // ms to s + tickTime.observe(server.tickTimes[server.getTickCount() % 100] * 1e-9); // ns to s. }); } }