aboutsummaryrefslogtreecommitdiff
path: root/spark-common/src/main/java/me/lucko/spark/common/command
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2022-04-19 12:45:46 +0100
committerLuck <git@lucko.me>2022-04-19 12:45:54 +0100
commit86a312842662ba57faa8fd5e8471672dfac13089 (patch)
tree484c8089f82e1486602d06e965cde61cab31a087 /spark-common/src/main/java/me/lucko/spark/common/command
parent45edd6197aa777d0c746f37a813d6be4ca916694 (diff)
downloadspark-86a312842662ba57faa8fd5e8471672dfac13089.tar.gz
spark-86a312842662ba57faa8fd5e8471672dfac13089.tar.bz2
spark-86a312842662ba57faa8fd5e8471672dfac13089.zip
Fix /proc/net output parsing and number formatting (#195)
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/common/command')
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/command/modules/HealthModule.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/command/modules/HealthModule.java b/spark-common/src/main/java/me/lucko/spark/common/command/modules/HealthModule.java
index ee3592a..16eadc8 100644
--- a/spark-common/src/main/java/me/lucko/spark/common/command/modules/HealthModule.java
+++ b/spark-common/src/main/java/me/lucko/spark/common/command/modules/HealthModule.java
@@ -48,6 +48,7 @@ import java.lang.management.MemoryType;
import java.lang.management.MemoryUsage;
import java.util.LinkedList;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.function.Consumer;
@@ -376,7 +377,7 @@ public class HealthModule implements CommandModule {
.content(" ")
.append(FormatUtil.formatBytes(bytesPerSec, GREEN, "/s"))
.append(text(" / "))
- .append(text(String.format("%,d", packetsPerSec), WHITE))
+ .append(text(String.format(Locale.ENGLISH, "%,d", packetsPerSec), WHITE))
.append(text(" pps "))
.append(text().color(DARK_GRAY)
.append(text('('))