Skip to content

Commit 50c8e14

Browse files
committed
perf(server): sort thread names for consistent ordering
The thread list is now sorted alphabetically by name to provide consistent ordering in the output
1 parent ac4cac4 commit 50c8e14

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/mindustrytool/handler/HttpServer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ public void init() {
460460
data.put("locales", Vars.locales);
461461
data.put("threads",
462462
Thread.getAllStackTraces().keySet().stream()
463+
.sorted((a, b) -> a.getName().compareTo(b.getName()))
463464
.map(thread -> java.util.Map.of(
464465
"id", thread.getId(),
465466
"name", thread.getName(),

0 commit comments

Comments
 (0)