From 0045d53a51002ed33f73be1a4829d9f56cb746c1 Mon Sep 17 00:00:00 2001 From: ruscalworld Date: Tue, 20 Jun 2023 16:36:41 +0300 Subject: [PATCH] Update project structure --- .../ru/ruscalworld/fabricexporter/MetricRegistry.java | 9 ++++++++- .../metrics/{ => spark}/MillisPerTick.java | 2 +- .../fabricexporter/metrics/{ => spark}/SparkMetric.java | 3 ++- .../metrics/{ => spark}/TicksPerSecond.java | 2 +- .../fabricexporter/metrics/{ => world}/Entities.java | 3 ++- .../fabricexporter/metrics/{ => world}/LoadedChunks.java | 3 ++- .../metrics/{ => world}/OnlinePlayers.java | 3 ++- .../metrics/{ => world}/TotalLoadedChunks.java | 3 ++- 8 files changed, 20 insertions(+), 8 deletions(-) rename src/main/java/ru/ruscalworld/fabricexporter/metrics/{ => spark}/MillisPerTick.java (95%) rename src/main/java/ru/ruscalworld/fabricexporter/metrics/{ => spark}/SparkMetric.java (74%) rename src/main/java/ru/ruscalworld/fabricexporter/metrics/{ => spark}/TicksPerSecond.java (91%) rename src/main/java/ru/ruscalworld/fabricexporter/metrics/{ => world}/Entities.java (94%) rename src/main/java/ru/ruscalworld/fabricexporter/metrics/{ => world}/LoadedChunks.java (84%) rename src/main/java/ru/ruscalworld/fabricexporter/metrics/{ => world}/OnlinePlayers.java (84%) rename src/main/java/ru/ruscalworld/fabricexporter/metrics/{ => world}/TotalLoadedChunks.java (85%) diff --git a/src/main/java/ru/ruscalworld/fabricexporter/MetricRegistry.java b/src/main/java/ru/ruscalworld/fabricexporter/MetricRegistry.java index 24603aa..4de90ae 100644 --- a/src/main/java/ru/ruscalworld/fabricexporter/MetricRegistry.java +++ b/src/main/java/ru/ruscalworld/fabricexporter/MetricRegistry.java @@ -4,7 +4,14 @@ import io.prometheus.client.Collector; import io.prometheus.client.Counter; import io.prometheus.client.SimpleCollector; import ru.ruscalworld.fabricexporter.config.MainConfig; -import ru.ruscalworld.fabricexporter.metrics.*; +import ru.ruscalworld.fabricexporter.metrics.Metric; +import ru.ruscalworld.fabricexporter.metrics.spark.MillisPerTick; +import ru.ruscalworld.fabricexporter.metrics.spark.SparkMetric; +import ru.ruscalworld.fabricexporter.metrics.spark.TicksPerSecond; +import ru.ruscalworld.fabricexporter.metrics.world.Entities; +import ru.ruscalworld.fabricexporter.metrics.world.LoadedChunks; +import ru.ruscalworld.fabricexporter.metrics.world.OnlinePlayers; +import ru.ruscalworld.fabricexporter.metrics.world.TotalLoadedChunks; import java.util.ArrayList; import java.util.HashMap; diff --git a/src/main/java/ru/ruscalworld/fabricexporter/metrics/MillisPerTick.java b/src/main/java/ru/ruscalworld/fabricexporter/metrics/spark/MillisPerTick.java similarity index 95% rename from src/main/java/ru/ruscalworld/fabricexporter/metrics/MillisPerTick.java rename to src/main/java/ru/ruscalworld/fabricexporter/metrics/spark/MillisPerTick.java index 67bd397..ff11d47 100644 --- a/src/main/java/ru/ruscalworld/fabricexporter/metrics/MillisPerTick.java +++ b/src/main/java/ru/ruscalworld/fabricexporter/metrics/spark/MillisPerTick.java @@ -1,4 +1,4 @@ -package ru.ruscalworld.fabricexporter.metrics; +package ru.ruscalworld.fabricexporter.metrics.spark; import me.lucko.spark.api.statistic.StatisticWindow; import me.lucko.spark.api.statistic.misc.DoubleAverageInfo; diff --git a/src/main/java/ru/ruscalworld/fabricexporter/metrics/SparkMetric.java b/src/main/java/ru/ruscalworld/fabricexporter/metrics/spark/SparkMetric.java similarity index 74% rename from src/main/java/ru/ruscalworld/fabricexporter/metrics/SparkMetric.java rename to src/main/java/ru/ruscalworld/fabricexporter/metrics/spark/SparkMetric.java index dc9cfe0..2145e38 100644 --- a/src/main/java/ru/ruscalworld/fabricexporter/metrics/SparkMetric.java +++ b/src/main/java/ru/ruscalworld/fabricexporter/metrics/spark/SparkMetric.java @@ -1,7 +1,8 @@ -package ru.ruscalworld.fabricexporter.metrics; +package ru.ruscalworld.fabricexporter.metrics.spark; import me.lucko.spark.api.Spark; import me.lucko.spark.api.SparkProvider; +import ru.ruscalworld.fabricexporter.metrics.Metric; public abstract class SparkMetric extends Metric { public SparkMetric(String name, String help, String... labels) { diff --git a/src/main/java/ru/ruscalworld/fabricexporter/metrics/TicksPerSecond.java b/src/main/java/ru/ruscalworld/fabricexporter/metrics/spark/TicksPerSecond.java similarity index 91% rename from src/main/java/ru/ruscalworld/fabricexporter/metrics/TicksPerSecond.java rename to src/main/java/ru/ruscalworld/fabricexporter/metrics/spark/TicksPerSecond.java index 3f85ff6..271d4e9 100644 --- a/src/main/java/ru/ruscalworld/fabricexporter/metrics/TicksPerSecond.java +++ b/src/main/java/ru/ruscalworld/fabricexporter/metrics/spark/TicksPerSecond.java @@ -1,4 +1,4 @@ -package ru.ruscalworld.fabricexporter.metrics; +package ru.ruscalworld.fabricexporter.metrics.spark; import me.lucko.spark.api.statistic.StatisticWindow; import me.lucko.spark.api.statistic.types.DoubleStatistic; diff --git a/src/main/java/ru/ruscalworld/fabricexporter/metrics/Entities.java b/src/main/java/ru/ruscalworld/fabricexporter/metrics/world/Entities.java similarity index 94% rename from src/main/java/ru/ruscalworld/fabricexporter/metrics/Entities.java rename to src/main/java/ru/ruscalworld/fabricexporter/metrics/world/Entities.java index 10464c0..c5a3dcd 100644 --- a/src/main/java/ru/ruscalworld/fabricexporter/metrics/Entities.java +++ b/src/main/java/ru/ruscalworld/fabricexporter/metrics/world/Entities.java @@ -1,4 +1,4 @@ -package ru.ruscalworld.fabricexporter.metrics; +package ru.ruscalworld.fabricexporter.metrics.world; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; @@ -7,6 +7,7 @@ import net.minecraft.server.world.ServerWorld; import net.minecraft.util.Identifier; import net.minecraft.util.TypeFilter; import ru.ruscalworld.fabricexporter.FabricExporter; +import ru.ruscalworld.fabricexporter.metrics.Metric; import ru.ruscalworld.fabricexporter.util.TextUtil; import java.util.HashMap; diff --git a/src/main/java/ru/ruscalworld/fabricexporter/metrics/LoadedChunks.java b/src/main/java/ru/ruscalworld/fabricexporter/metrics/world/LoadedChunks.java similarity index 84% rename from src/main/java/ru/ruscalworld/fabricexporter/metrics/LoadedChunks.java rename to src/main/java/ru/ruscalworld/fabricexporter/metrics/world/LoadedChunks.java index 2b01553..937b0a2 100644 --- a/src/main/java/ru/ruscalworld/fabricexporter/metrics/LoadedChunks.java +++ b/src/main/java/ru/ruscalworld/fabricexporter/metrics/world/LoadedChunks.java @@ -1,7 +1,8 @@ -package ru.ruscalworld.fabricexporter.metrics; +package ru.ruscalworld.fabricexporter.metrics.world; import net.minecraft.server.world.ServerWorld; import ru.ruscalworld.fabricexporter.FabricExporter; +import ru.ruscalworld.fabricexporter.metrics.Metric; import ru.ruscalworld.fabricexporter.util.TextUtil; public class LoadedChunks extends Metric { diff --git a/src/main/java/ru/ruscalworld/fabricexporter/metrics/OnlinePlayers.java b/src/main/java/ru/ruscalworld/fabricexporter/metrics/world/OnlinePlayers.java similarity index 84% rename from src/main/java/ru/ruscalworld/fabricexporter/metrics/OnlinePlayers.java rename to src/main/java/ru/ruscalworld/fabricexporter/metrics/world/OnlinePlayers.java index a4fb1e8..4c62a7d 100644 --- a/src/main/java/ru/ruscalworld/fabricexporter/metrics/OnlinePlayers.java +++ b/src/main/java/ru/ruscalworld/fabricexporter/metrics/world/OnlinePlayers.java @@ -1,7 +1,8 @@ -package ru.ruscalworld.fabricexporter.metrics; +package ru.ruscalworld.fabricexporter.metrics.world; import net.minecraft.server.world.ServerWorld; import ru.ruscalworld.fabricexporter.FabricExporter; +import ru.ruscalworld.fabricexporter.metrics.Metric; import ru.ruscalworld.fabricexporter.util.TextUtil; public class OnlinePlayers extends Metric { diff --git a/src/main/java/ru/ruscalworld/fabricexporter/metrics/TotalLoadedChunks.java b/src/main/java/ru/ruscalworld/fabricexporter/metrics/world/TotalLoadedChunks.java similarity index 85% rename from src/main/java/ru/ruscalworld/fabricexporter/metrics/TotalLoadedChunks.java rename to src/main/java/ru/ruscalworld/fabricexporter/metrics/world/TotalLoadedChunks.java index 74fc854..c60b5dd 100644 --- a/src/main/java/ru/ruscalworld/fabricexporter/metrics/TotalLoadedChunks.java +++ b/src/main/java/ru/ruscalworld/fabricexporter/metrics/world/TotalLoadedChunks.java @@ -1,7 +1,8 @@ -package ru.ruscalworld.fabricexporter.metrics; +package ru.ruscalworld.fabricexporter.metrics.world; import net.minecraft.server.world.ServerWorld; import ru.ruscalworld.fabricexporter.FabricExporter; +import ru.ruscalworld.fabricexporter.metrics.Metric; import ru.ruscalworld.fabricexporter.util.TextUtil; public class TotalLoadedChunks extends Metric {