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
@@ -33,6 +33,7 @@ public abstract class Command {
protected String usageMessage;
private String permission;
private String permissionMessage;
public org.spigotmc.CustomTimingsHandler timings; // Spigot
protected Command(@NotNull String name) {
this(name, "", "/" + name, new ArrayList<String>());
@@ -46,6 +47,7 @@ public abstract class Command {
this.usageMessage = (usageMessage == null) ? "/" + name : usageMessage;
this.aliases = aliases;
this.activeAliases = new ArrayList<String>(aliases);
this.timings = new org.spigotmc.CustomTimingsHandler("** Command: " + name); // Spigot
}
/**
@@ -243,6 +245,7 @@ public abstract class Command {
}
this.nextLabel = name;
if (!isRegistered()) {
this.timings = new org.spigotmc.CustomTimingsHandler("** Command: " + name); // Spigot
this.label = name;
return true;
}