Spigot Timings

Adds performance tracking timings all around the Minecraft Server, and improves the usability of the /timings command

Plugins can track their own timings with CustomTimingsHandler

By: Aikar <aikar@aikar.co>
This commit is contained in:
Bukkit/Spigot
2013-06-02 10:42:57 +10:00
parent 8de3a6a15d
commit c2123d2080
9 changed files with 292 additions and 5 deletions
@@ -145,11 +145,15 @@ public class SimpleCommandMap implements CommandMap {
}
try {
target.timings.startTiming(); // Spigot
// Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false)
target.execute(sender, sentCommandLabel, Arrays.copyOfRange(args, 1, args.length));
target.timings.stopTiming(); // Spigot
} catch (CommandException ex) {
target.timings.stopTiming(); // Spigot
throw ex;
} catch (Throwable ex) {
target.timings.stopTiming(); // Spigot
throw new CommandException("Unhandled exception executing '" + commandLine + "' in " + target, ex);
}