From 1118fd305b0495b11b72ed581d1292a78611b12c Mon Sep 17 00:00:00 2001 From: a3510377 Date: Wed, 15 Nov 2023 21:17:46 +0800 Subject: [PATCH] feat new lable --- gradle.properties | 2 +- src/main/java/com/carpet_prometheus/metrics/Player.java | 3 --- src/main/java/com/carpet_prometheus/metrics/Tick.java | 1 + 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index 013bbba..19dcb14 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ loader_version=0.14.24 # https://github.com/prometheus/client_java prometheus_version=1.0.0 # Mod Properties -mod_version=1.0.0 +mod_version=1.0.1 maven_group=com.carpet_prometheus archives_base_name=carpet_prometheus # Dependencies diff --git a/src/main/java/com/carpet_prometheus/metrics/Player.java b/src/main/java/com/carpet_prometheus/metrics/Player.java index 65a9be0..94859c6 100644 --- a/src/main/java/com/carpet_prometheus/metrics/Player.java +++ b/src/main/java/com/carpet_prometheus/metrics/Player.java @@ -4,8 +4,6 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.world.ServerWorld; -import net.minecraft.util.registry.RegistryKey; -import net.minecraft.world.World; import java.util.List; @@ -18,7 +16,6 @@ public Player() { public void update(MinecraftServer server) { // edit from: https://github.com/gnembon/fabric-carpet/blob/7486670918f733aaf6ae3b595290947802024d02/src/main/java/carpet/utils/SpawnReporter.java#L105 for (ServerWorld world : server.getWorlds()) { - RegistryKey dim = world.getRegistryKey(); List players = world.getPlayers(); String worldName = world.getRegistryKey().getValue().toString(); diff --git a/src/main/java/com/carpet_prometheus/metrics/Tick.java b/src/main/java/com/carpet_prometheus/metrics/Tick.java index 38c6c43..ad69b8e 100644 --- a/src/main/java/com/carpet_prometheus/metrics/Tick.java +++ b/src/main/java/com/carpet_prometheus/metrics/Tick.java @@ -47,5 +47,6 @@ public void update(MinecraftServer server) { this.getGauge().labelValues("mspt").set(mspt); this.getGauge().labelValues("tps").set(getTPS(mspt)); + this.getGauge().labelValues("BASE").set(TickSpeed.mspt); } }