mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@9b1798d6 Simplify custom payload handling (#12347) PaperMC/Paper@2552abf0 fix message mutation in PlayerSetSpawnEvent PaperMC/Paper@ae99e24f fix deprecated bungee chat api methods PaperMC/Paper@dca4aab8 add util methods to CraftChatMessage PaperMC/Paper@87c9d9b0 be more lenient on url parsing for legacy format PaperMC/Paper@4a9bd2e3 Correctly clear items in PlayerDeathEvent PaperMC/Paper@a70f7745 fix unsaveable launched trident PaperMC/Paper@41a094cf move block data/state impl PaperMC/Paper@6b26b219 remove hardcoded durability from material PaperMC/Paper@db8c646d Merge remote-tracking branch 'origin/main' into update/1.21.5
36 lines
1.8 KiB
Diff
36 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martijn Muijsers <martijnmuijsers@live.nl>
|
|
Date: Wed, 9 Aug 2023 15:04:56 +0200
|
|
Subject: [PATCH] Virtual thread support
|
|
|
|
License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|
Gale - https://galemc.org
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
|
index a35c0af0c53bab4c1b3623e903d3057c816e5d3b..3e9bbe0dae0cd1bdb390f68612dbf824b6ed4df7 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
|
@@ -976,6 +976,22 @@ public class Metrics {
|
|
}));
|
|
// Gale end - SIMD support - include in metrics
|
|
|
|
+ // Gale start - virtual thread support - include in metrics
|
|
+ Map<String, Map<String, Integer>> virtualThreadSupportMap = new HashMap<>(2);
|
|
+ {
|
|
+ Map<String, Integer> entry = new HashMap<>(2);
|
|
+ boolean isSupported = org.galemc.gale.virtualthread.VirtualThreadService.isSupported();
|
|
+ try {
|
|
+ int javaMajorVersion = org.galemc.gale.virtualthread.VirtualThreadService.getJavaMajorVersion();
|
|
+ entry.put(isSupported + " (Java " + javaMajorVersion + ")", 1);
|
|
+ } catch (Exception ignored) {
|
|
+ entry.put(String.valueOf(isSupported), 1);
|
|
+ }
|
|
+ virtualThreadSupportMap.put(String.valueOf(isSupported), entry);
|
|
+ }
|
|
+ metrics.addCustomChart(new Metrics.DrilldownPie("virtual_thread_support", () -> virtualThreadSupportMap));
|
|
+ // Gale end - virtual thread support - include in metrics
|
|
+
|
|
}
|
|
|
|
}
|