From d4913b301a374560fd4a34cd36f456e694b9b0fb Mon Sep 17 00:00:00 2001 From: Luck Date: Sun, 28 Nov 2021 11:02:51 +0000 Subject: Add spark version to platform metadata --- spark-api/src/main/java/me/lucko/spark/api/Spark.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'spark-api/src') diff --git a/spark-api/src/main/java/me/lucko/spark/api/Spark.java b/spark-api/src/main/java/me/lucko/spark/api/Spark.java index 8620348..653eb53 100644 --- a/spark-api/src/main/java/me/lucko/spark/api/Spark.java +++ b/spark-api/src/main/java/me/lucko/spark/api/Spark.java @@ -26,7 +26,6 @@ package me.lucko.spark.api; import me.lucko.spark.api.gc.GarbageCollector; -import me.lucko.spark.api.statistic.StatisticWindow; import me.lucko.spark.api.statistic.misc.DoubleAverageInfo; import me.lucko.spark.api.statistic.types.DoubleStatistic; import me.lucko.spark.api.statistic.types.GenericStatistic; @@ -37,6 +36,10 @@ import org.jetbrains.annotations.Unmodifiable; import java.util.Map; +import static me.lucko.spark.api.statistic.StatisticWindow.CpuUsage; +import static me.lucko.spark.api.statistic.StatisticWindow.MillisPerTick; +import static me.lucko.spark.api.statistic.StatisticWindow.TicksPerSecond; + /** * The spark API. */ @@ -47,14 +50,14 @@ public interface Spark { * * @return the CPU process statistic */ - @NonNull DoubleStatistic cpuProcess(); + @NonNull DoubleStatistic cpuProcess(); /** * Gets the CPU usage statistic for the overall system. * * @return the CPU system statistic */ - @NonNull DoubleStatistic cpuSystem(); + @NonNull DoubleStatistic cpuSystem(); /** * Gets the ticks per second statistic. @@ -63,7 +66,7 @@ public interface Spark { * * @return the ticks per second statistic */ - @Nullable DoubleStatistic tps(); + @Nullable DoubleStatistic tps(); /** * Gets the milliseconds per tick statistic. @@ -72,7 +75,7 @@ public interface Spark { * * @return the milliseconds per tick statistic */ - @Nullable GenericStatistic mspt(); + @Nullable GenericStatistic mspt(); /** * Gets the garbage collector statistics. -- cgit