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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user