From 3b4630072e1ea47c95236466ad2183ed2287b9f7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 23 Feb 2016 22:35:34 -0600 Subject: [PATCH] More timings for scheduler --- Spigot-Server-Patches/Timings-v2.patch | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/Timings-v2.patch b/Spigot-Server-Patches/Timings-v2.patch index abacaf2b3b..6975fe282f 100644 --- a/Spigot-Server-Patches/Timings-v2.patch +++ b/Spigot-Server-Patches/Timings-v2.patch @@ -23,7 +23,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public static final Timing playerListTimer = Timings.ofSafe("Player List"); + public static final Timing connectionTimer = Timings.ofSafe("Connection Handler"); + public static final Timing tickablesTimer = Timings.ofSafe("Tickables"); -+ public static final Timing schedulerTimer = Timings.ofSafe("Scheduler"); ++ public static final Timing minecraftSchedulerTimer = Timings.ofSafe("Minecraft Scheduler"); ++ public static final Timing bukkitSchedulerTimer = Timings.ofSafe("Bukkit Scheduler"); + public static final Timing chunkIOTickTimer = Timings.ofSafe("ChunkIOTick"); + public static final Timing timeUpdateTimer = Timings.ofSafe("Time Update"); + public static final Timing serverCommandTimer = Timings.ofSafe("Server Command"); @@ -380,6 +381,27 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } public void B() { ++ SpigotTimings.minecraftSchedulerTimer.startTiming(); // Spigot + this.methodProfiler.a("jobs"); + Queue queue = this.j; + +@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs + SystemUtils.a(entry, MinecraftServer.LOGGER); + } + // Spigot end ++ SpigotTimings.minecraftSchedulerTimer.stopTiming(); // Spigot + + this.methodProfiler.c("levels"); + +- SpigotTimings.schedulerTimer.startTiming(); // Spigot ++ SpigotTimings.bukkitSchedulerTimer.startTiming(); // Spigot + // CraftBukkit start + this.server.getScheduler().mainThreadHeartbeat(this.ticks); +- SpigotTimings.schedulerTimer.stopTiming(); // Spigot ++ SpigotTimings.bukkitSchedulerTimer.stopTiming(); // Spigot + + // Run tasks that are waiting on processing + SpigotTimings.processQueueTimer.startTiming(); // Spigot diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java