diff options
Diffstat (limited to 'patches/server/0517-Improve-ServerGUI.patch')
-rw-r--r-- | patches/server/0517-Improve-ServerGUI.patch | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/patches/server/0517-Improve-ServerGUI.patch b/patches/server/0517-Improve-ServerGUI.patch index 9aec8b6334..4826a41eff 100644 --- a/patches/server/0517-Improve-ServerGUI.patch +++ b/patches/server/0517-Improve-ServerGUI.patch @@ -58,10 +58,10 @@ index 2bbc57b4869caf690f53618d60359c5133ec62a8..c42a9949c4d37d45883867a54222a7ab public void windowClosing(WindowEvent windowevent) { if (!servergui.isClosing.getAndSet(true)) { diff --git a/src/main/java/net/minecraft/server/gui/StatsComponent.java b/src/main/java/net/minecraft/server/gui/StatsComponent.java -index 6e9c6d556ed55325e36d191fc9d1508c00879671..096c89bd01cec2abd151bf6fffc4847d1bcd548f 100644 +index 6d77a48ce4241477cf66fbf562b542de01f420ce..a34dc23499a9d55cceb1f2b2907e4d34b0d67616 100644 --- a/src/main/java/net/minecraft/server/gui/StatsComponent.java +++ b/src/main/java/net/minecraft/server/gui/StatsComponent.java -@@ -34,10 +34,19 @@ public class StatsComponent extends JComponent { +@@ -34,8 +34,17 @@ public class StatsComponent extends JComponent { private void tick() { long l = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); @@ -73,15 +73,13 @@ index 6e9c6d556ed55325e36d191fc9d1508c00879671..096c89bd01cec2abd151bf6fffc4847d + tpsAvg[g] = format( tps[g] ); + } this.msgs[0] = "Memory use: " + l / 1024L / 1024L + " mb (" + Runtime.getRuntime().freeMemory() * 100L / Runtime.getRuntime().maxMemory() + "% free)"; - this.msgs[1] = "Avg tick: " - + DECIMAL_FORMAT.format((double)this.server.getAverageTickTimeNanos() / (double)TimeUtil.NANOSECONDS_PER_MILLISECOND) - + " ms"; + this.msgs[1] = "Avg tick: " + DECIMAL_FORMAT.format((double)this.server.getAverageTickTimeNanos() / TimeUtil.NANOSECONDS_PER_MILLISECOND) + " ms"; + this.msgs[2] = "TPS from last 1m, 5m, 15m: " + String.join(", ", tpsAvg); + // Paper end - Improve ServerGUI this.values[this.vp++ & 0xFF] = (int)(l * 100L / Runtime.getRuntime().maxMemory()); this.repaint(); } -@@ -66,4 +75,10 @@ public class StatsComponent extends JComponent { +@@ -64,4 +73,10 @@ public class StatsComponent extends JComponent { public void close() { this.timer.stop(); } |