Skip to content

Commit

Permalink
feat new lable
Browse files Browse the repository at this point in the history
  • Loading branch information
a3510377 committed Nov 15, 2023
1 parent 25b0320 commit 1118fd3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/carpet_prometheus/metrics/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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<World> dim = world.getRegistryKey();
List<ServerPlayerEntity> players = world.getPlayers();
String worldName = world.getRegistryKey().getValue().toString();

Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/carpet_prometheus/metrics/Tick.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 1118fd3

Please sign in to comment.