Fix BenchmarkManager#getCpuMonitoringMessage color

This commit is contained in:
themode 2021-03-26 20:35:30 +01:00
parent 9789f541cf
commit cb8225c5f3

View File

@ -6,7 +6,6 @@ import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.format.NamedTextColor;
import net.minestom.server.MinecraftServer;
import net.minestom.server.adventure.AdventureSerializer;
import net.minestom.server.utils.MathUtils;
import net.minestom.server.utils.time.UpdateOption;
import net.minestom.server.utils.validate.Check;
@ -117,13 +116,13 @@ public final class BenchmarkManager {
benchmarkMessage.append(Component.text(name, NamedTextColor.GRAY));
benchmarkMessage.append(Component.text(": "));
benchmarkMessage.append(Component.text(MathUtils.round(result.getCpuPercentage(), 2), NamedTextColor.YELLOW));
benchmarkMessage.append(Component.text("% CPU "));
benchmarkMessage.append(Component.text("% CPU ", NamedTextColor.YELLOW));
benchmarkMessage.append(Component.text(MathUtils.round(result.getUserPercentage(), 2), NamedTextColor.RED));
benchmarkMessage.append(Component.text("% USER "));
benchmarkMessage.append(Component.text("% USER ", NamedTextColor.RED));
benchmarkMessage.append(Component.text(MathUtils.round(result.getBlockedPercentage(), 2), NamedTextColor.LIGHT_PURPLE));
benchmarkMessage.append(Component.text("% BLOCKED "));
benchmarkMessage.append(Component.text("% BLOCKED ", NamedTextColor.LIGHT_PURPLE));
benchmarkMessage.append(Component.text(MathUtils.round(result.getWaitedPercentage(), 2), NamedTextColor.GREEN));
benchmarkMessage.append(Component.text("% WAITED "));
benchmarkMessage.append(Component.text("% WAITED ", NamedTextColor.GREEN));
benchmarkMessage.append(Component.newline());
}