Skip to content

Commit

Permalink
fix log command tps
Browse files Browse the repository at this point in the history
  • Loading branch information
MC-XiaoHei committed Aug 9, 2024
1 parent 23f5329 commit 7748446
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions patches/server/0056-Implementation-Carpet-features.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6670,10 +6670,10 @@ index 0000000000000000000000000000000000000000..949eea4d3c29e0b2f7e90e1ea924f852
+}
diff --git a/src/main/java/org/leavesmc/lumina/carpet/logging/HUDController.java b/src/main/java/org/leavesmc/lumina/carpet/logging/HUDController.java
new file mode 100644
index 0000000000000000000000000000000000000000..a28f9b7e7a595103a89b5d08041abebdab9df6a7
index 0000000000000000000000000000000000000000..319510035b5d8d81f2f863db9bd0b71694835a92
--- /dev/null
+++ b/src/main/java/org/leavesmc/lumina/carpet/logging/HUDController.java
@@ -0,0 +1,145 @@
@@ -0,0 +1,146 @@
+package org.leavesmc.lumina.carpet.logging;
+
+import io.papermc.paper.threadedregions.*;
Expand Down Expand Up @@ -6756,8 +6756,9 @@ index 0000000000000000000000000000000000000000..a28f9b7e7a595103a89b5d08041abebd
+ final TickData.TickReportData tickReport = currentData.getRegionSchedulingHandle().getTickReport5s(System.nanoTime());
+
+ final TickData.SegmentedAverage tpsData = tickReport.tpsData();
+ final TickData.SegmentedAverage msptData = tickReport.timePerTickData();
+
+ final double mspt = tpsData.segmentAll().average() / 1.0E6;
+ final double mspt = msptData.segmentAll().average() / 1.0E6;
+ final double tps = tpsData.segmentAll().average();
+ String color = Messenger.heatmap_color(mspt, ((long) ((double) TimeUtil.NANOSECONDS_PER_SECOND / tps) / (float) TimeUtil.NANOSECONDS_PER_MILLISECOND));
+ tpsMsg = Messenger.c(
Expand Down

0 comments on commit 7748446

Please sign in to comment.