diff options
author | Luck <git@lucko.me> | 2022-04-19 12:45:46 +0100 |
---|---|---|
committer | Luck <git@lucko.me> | 2022-04-19 12:45:54 +0100 |
commit | 86a312842662ba57faa8fd5e8471672dfac13089 (patch) | |
tree | 484c8089f82e1486602d06e965cde61cab31a087 /spark-common/src/main/java/me/lucko/spark/common/command | |
parent | 45edd6197aa777d0c746f37a813d6be4ca916694 (diff) | |
download | spark-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.java | 3 |
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('(')) |