Show Plugins Event Listeners under Combined Total in Timings

This commit is contained in:
Aikar 2020-06-09 21:48:35 -04:00
parent c5c909c9af
commit 2c4499b71c
No known key found for this signature in database
GPG Key ID: 401ADFC9891FAAFE
1 changed files with 4 additions and 4 deletions

View File

@ -171,7 +171,7 @@ index 0000000000000000000000000000000000000000..9b45ce887b9172f30302b83fe24b99b7
+} +}
diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..933ecf9bd232a376796d0f15babb0725cdeba3c9 index 0000000000000000000000000000000000000000..4e6e1b8e8aeb07e34536941d2cbfc25e5cfa6c27
--- /dev/null --- /dev/null
+++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java +++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java
@@ -0,0 +1,83 @@ @@ -0,0 +1,83 @@
@ -243,8 +243,8 @@ index 0000000000000000000000000000000000000000..933ecf9bd232a376796d0f15babb0725
+ +
+ final String eventName = eventClass.getSimpleName(); + final String eventName = eventClass.getSimpleName();
+ boolean verbose = "BlockPhysicsEvent".equals(eventName); + boolean verbose = "BlockPhysicsEvent".equals(eventName);
+ this.timings = Timings.ofSafe(plugin.getName(), (verbose ? "## " : "") + + this.timings = Timings.ofSafe(plugin, (verbose ? "## " : "") +
+ "Event: " + id + " (" + eventName + ")", null); + "Event: " + id + " (" + eventName + ")");
+ } + }
+ +
+ @Override + @Override
@ -2821,7 +2821,7 @@ index f6fb72fab398ae8ca8b746154ff3c8fcad378faf..fad4e929264e2be534d3c4a90a5d557f
* Sends the component to the player * Sends the component to the player
* *
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 247d194f86c00db11acbc58e7d163b2606db4f07..26dbc2a761108d6aad056a786cb5146c63b7ad3d 100644 index 247d194f86c00db11acbc58e7d163b2606db4f07..945b8b030d1b2a13afc0c4efad76997eb7bf00ba 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java --- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -18,6 +18,7 @@ import org.bukkit.plugin.PluginDescriptionFile; @@ -18,6 +18,7 @@ import org.bukkit.plugin.PluginDescriptionFile;