[ci skip] Add more identifying patch comments

This commit is contained in:
Nassim Jahnke
2024-01-21 12:11:43 +01:00
parent dee90322eb
commit f6609428b6
46 changed files with 136 additions and 140 deletions

View File

@@ -132,11 +132,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
private int playerIdleTimeout;
private final long[] tickTimesNanos;
private long aggregatedTickTimesNanos;
+ // Paper start
+ // Paper start - Add tick times API and /mspt command
+ public final TickTimes tickTimes5s = new TickTimes(100);
+ public final TickTimes tickTimes10s = new TickTimes(200);
+ public final TickTimes tickTimes60s = new TickTimes(1200);
+ // Paper end
+ // Paper end - Add tick times API and /mspt command
@Nullable
private KeyPair keyPair;
@Nullable
@@ -144,11 +144,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.smoothedTickTimeMillis = this.smoothedTickTimeMillis * 0.8F + (float) j / (float) TimeUtil.NANOSECONDS_PER_MILLISECOND * 0.19999999F;
long l = Util.getNanos();
+ // Paper start
+ // Paper start - Add tick times API and /mspt command
+ tickTimes5s.add(this.tickCount, j);
+ tickTimes10s.add(this.tickCount, j);
+ tickTimes60s.add(this.tickCount, j);
+ // Paper end
+ // Paper end - Add tick times API and /mspt command
this.logTickTime(l - i);
this.profiler.pop();
org.spigotmc.WatchdogThread.tick(); // Spigot
@@ -157,7 +157,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+
+ // Paper start
+ // Paper start - Add tick times API and /mspt command
+ public static class TickTimes {
+ private final long[] times;
+
@@ -181,7 +181,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return ((double) total / (double) times.length) * 1.0E-6D;
+ }
+ }
+ // Paper end
+ // Paper end - Add tick times API and /mspt command
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644