From 3d17798f3066eb51f926242a65af8a73ed0182a7 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 17 Apr 2024 16:37:55 +0100 Subject: [PATCH] fix cpu metric --- .../service/metric/metrics/process/CpuUsageMetric.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/xyz/mcutils/backend/service/metric/metrics/process/CpuUsageMetric.java b/src/main/java/xyz/mcutils/backend/service/metric/metrics/process/CpuUsageMetric.java index 45a6133..40cf914 100644 --- a/src/main/java/xyz/mcutils/backend/service/metric/metrics/process/CpuUsageMetric.java +++ b/src/main/java/xyz/mcutils/backend/service/metric/metrics/process/CpuUsageMetric.java @@ -15,6 +15,11 @@ public class CpuUsageMetric extends DoubleMetric { super("cpu_usage"); } + @Override + public boolean isCollector() { + return true; + } + @Override public void collect() { this.setValue(OS_BEAN.getProcessCpuLoad() * 100);