From 86cb43024569ebf1f2488a70fa7f9a221928a6da Mon Sep 17 00:00:00 2001 From: Spigot Date: Thu, 8 Aug 2013 13:56:08 +1000 Subject: [PATCH] Add violations back to timings By: md_5 --- Bukkit-Patches/0004-Enchanced-Timings.patch | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Bukkit-Patches/0004-Enchanced-Timings.patch b/Bukkit-Patches/0004-Enchanced-Timings.patch index 7fe3f786cc..1ccb0b6e7d 100644 --- a/Bukkit-Patches/0004-Enchanced-Timings.patch +++ b/Bukkit-Patches/0004-Enchanced-Timings.patch @@ -1,4 +1,4 @@ -From 945cdf1a3e7eec1f1b2b4ed7c3a7f8d408a76530 Mon Sep 17 00:00:00 2001 +From e69a3c7cab108b3ee8e7592807822e0b370886a4 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 11:17:05 +1000 Subject: [PATCH] Enchanced Timings @@ -17,7 +17,7 @@ index fb3c90f..ffbcac1 100644 Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Reload complete."); diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java -index 7c28b75..b9c19de 100644 +index 7c28b75..ec1320f 100644 --- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java +++ b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java @@ -35,7 +35,7 @@ public class TimingsCommand extends BukkitCommand { @@ -87,7 +87,14 @@ index 7c28b75..b9c19de 100644 int index = 0; int pluginIdx = 0; File timingFolder = new File("timings"); -@@ -105,6 +132,9 @@ public class TimingsCommand extends BukkitCommand { +@@ -99,12 +126,15 @@ public class TimingsCommand extends BukkitCommand { + totalTime += time; + Class eventClass = trl.getEventClass(); + if (count > 0 && eventClass != null) { +- fileTimings.println(" " + eventClass.getSimpleName() + (trl.hasMultiple() ? " (and sub-classes)" : "") + " Time: " + time + " Count: " + count + " Avg: " + avg); ++ fileTimings.println(" " + eventClass.getSimpleName() + (trl.hasMultiple() ? " (and sub-classes)" : "") + " Time: " + time + " Count: " + count + " Avg: " + avg + " Violations: " + trl.violations); // Spigot + } + } } fileTimings.println(" Total time " + totalTime + " (" + totalTime / 1000000000 + "s)"); }