show more info in technical tab view

This commit is contained in:
Elias Müller 2024-09-23 19:18:19 +02:00
parent f89a935c05
commit aaad9fe7d8
2 changed files with 8 additions and 2 deletions

View File

@ -151,7 +151,11 @@ public class ComponentUtil {
)) ))
.append(Component.text(" | ", NamedTextColor.GRAY)) .append(Component.text(" | ", NamedTextColor.GRAY))
.append(Component.text( .append(Component.text(
String.format("%.2f load avg", monitor.getSystemLoadAverage()), String.format(
"1min %.2f load avg (%.0f%%)",
monitor.getSystemLoadAverage(),
(monitor.getSystemLoadAverage() / monitor.getAvailableProcessors()) * 100
),
NamedTextColor.LIGHT_PURPLE NamedTextColor.LIGHT_PURPLE
)) ))
.append(Component.text(" | ", NamedTextColor.GRAY)) .append(Component.text(" | ", NamedTextColor.GRAY))

View File

@ -31,9 +31,11 @@ public class DataSizeConverter {
long seconds = nanoseconds / 1_000_000_000; long seconds = nanoseconds / 1_000_000_000;
long minutes = seconds / 60; long minutes = seconds / 60;
long hours = minutes / 60; long hours = minutes / 60;
long days = hours / 24;
seconds %= 60; seconds %= 60;
minutes %= 60; minutes %= 60;
return String.format("%dh%dm%ds", hours, minutes, seconds); hours %= 60;
return String.format("%dd%dh%dm%ds", days, hours, minutes, seconds);
} }
} }