mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-11-16 07:15:14 +01:00
3a793b886c
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing BungeeCord Changes: d8c222ae Update date d20e622b Apply checkstyle to javadoc 6c8a0cce Remove m2e settings, causes useless warnings 2f547f73 Fix some javadoc warnings 5f29e939 #2720: Send different log message for pings (vs login) 46521568 #2740: Fix BaseComponent#equals() stack overflow d2ceccd6 #2725: Various improvements to chat API 7ed4c41d #2723: Improved Send Command
32 lines
1.3 KiB
Diff
32 lines
1.3 KiB
Diff
From cdc746a9ee1c083ea0598a553647e17498fde3bc Mon Sep 17 00:00:00 2001
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
Date: Tue, 26 Mar 2019 04:28:18 +0000
|
|
Subject: [PATCH] Report slow events in milliseconds
|
|
|
|
nanoseconds is an overly accurate measurement for event handers, and
|
|
only ends up confusing and overly worrying people.
|
|
|
|
milliseconds is a much more normal and expected measurement in the
|
|
community, especially when we do not care about nanosecond level
|
|
accuracy.
|
|
|
|
diff --git a/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java b/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java
|
|
index 11abcbb7..5b99c84a 100644
|
|
--- a/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java
|
|
+++ b/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java
|
|
@@ -438,9 +438,9 @@ public class PluginManager
|
|
long elapsed = System.nanoTime() - start;
|
|
if ( elapsed > 250000000 )
|
|
{
|
|
- ProxyServer.getInstance().getLogger().log( Level.WARNING, "Event {0} took {1}ns to process!", new Object[]
|
|
+ ProxyServer.getInstance().getLogger().log( Level.WARNING, "Event {0} took {1}ms to process!", new Object[] // Waterfall - human values
|
|
{
|
|
- event, elapsed
|
|
+ event, elapsed / 1000000 // Waterfall - human values
|
|
} );
|
|
}
|
|
return event;
|
|
--
|
|
2.24.1
|
|
|