diff options
author | Riley Park <[email protected]> | 2024-07-20 20:01:46 -0700 |
---|---|---|
committer | Riley Park <[email protected]> | 2024-07-20 20:01:46 -0700 |
commit | 38e61d072fa3043e71425ae62ab3ec7eb3041b0d (patch) | |
tree | 277039cbcab2e86e3768f42d0c7327491919b616 | |
parent | 3a47518b4bc5252d1204c7ee59098f6b4d247290 (diff) | |
download | Paper-38e61d072fa3043e71425ae62ab3ec7eb3041b0d.tar.gz Paper-38e61d072fa3043e71425ae62ab3ec7eb3041b0d.zip |
Timings says goodbye
-rw-r--r-- | patches/api/0011-Timings-v2.patch | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/patches/api/0011-Timings-v2.patch b/patches/api/0011-Timings-v2.patch index 928003f621..5cee947294 100644 --- a/patches/api/0011-Timings-v2.patch +++ b/patches/api/0011-Timings-v2.patch @@ -3,8 +3,6 @@ From: Aikar <[email protected]> Date: Mon, 29 Feb 2016 18:48:17 -0600 Subject: [PATCH] Timings v2 -TODO: Add #isStopping to FullServerTickHandler#stopTiming in patch 191 -expose isRunning diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java new file mode 100644 @@ -274,10 +272,10 @@ index 0000000000000000000000000000000000000000..a3ad690691eb5537a565d7ba684354ac +} diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java new file mode 100644 -index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2ca7c44f0 +index 0000000000000000000000000000000000000000..421be8a6f9a65596ac8eab071e6ee57533d02718 --- /dev/null +++ b/src/main/java/co/aikar/timings/Timing.java -@@ -0,0 +1,86 @@ +@@ -0,0 +1,94 @@ +/* + * This file is licensed under the MIT License (MIT). + * @@ -319,14 +317,17 @@ index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2 + * @return Timing + */ + @NotNull -+ Timing startTiming(); ++ default Timing startTiming() { ++ return this; ++ } + + /** + * <p>Stops timing and records the data. Propagates the data up to group handlers.</p> + * + * Will automatically be called when this Timing is used with try-with-resources + */ -+ void stopTiming(); ++ default void stopTiming() { ++ } + + /** + * Starts timing the execution until {@link #stopTiming()} is called. @@ -336,7 +337,9 @@ index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2 + * @return Timing + */ + @NotNull -+ Timing startTimingIfSync(); ++ default Timing startTimingIfSync() { ++ return this; ++ } + + /** + * <p>Stops timing and records the data. Propagates the data up to group handlers.</p> @@ -345,13 +348,15 @@ index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2 + * + * But only if we are on the primary thread. + */ -+ void stopTimingIfSync(); ++ default void stopTimingIfSync() { ++ } + + /** + * @deprecated Doesn't do anything - Removed + */ + @Deprecated -+ void abort(); ++ default void abort() { ++ } + + /** + * Used internally to get the actual backing Handler in the case of delegated Handlers @@ -362,7 +367,8 @@ index 0000000000000000000000000000000000000000..4195efcfe044618052bb03dea34a4fb2 + TimingHandler getTimingHandler(); + + @Override -+ void close(); ++ default void close() { ++ } +} diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java new file mode 100644 |