mirror of
https://github.com/PaperMC/Waterfall.git
synced 2025-01-03 22:47:38 +01:00
337ca7f887
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: 70038c91 Revert "#2714: Remove unnecessary throws in ServerConnector" 39ef20b2 #2716: Don't attempt to send kick packet during handshake phase 74a6aa32 #2714: Remove unnecessary throws in ServerConnector c7984070 Misc dependency update
32 lines
1.3 KiB
Diff
32 lines
1.3 KiB
Diff
From a4d949a57edd3e44403db85279ee99d229b000fa 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 81bd18f0..9408e6c2 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
|
|
@@ -435,9 +435,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.0
|
|
|