From e806430c29fa1e65e1d27efefb2de8b2b0e53749 Mon Sep 17 00:00:00 2001 From: Fuzzlemann Date: Wed, 26 Jul 2017 17:13:04 +0200 Subject: [PATCH] Adds %averagecpuweek% and %averagecpuday% Feature / "Issue" #195 --- .../java/com/djrapitops/plan/data/analysis/TPSPart.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Plan/src/main/java/com/djrapitops/plan/data/analysis/TPSPart.java b/Plan/src/main/java/com/djrapitops/plan/data/analysis/TPSPart.java index 1a47db077..8fc629d83 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/analysis/TPSPart.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/analysis/TPSPart.java @@ -51,8 +51,14 @@ public class TPSPart extends RawData { double averageTPSweek = MathUtils.averageDouble(week.stream().map(TPS::getTps)); double averageTPSday = MathUtils.averageDouble(day.stream().map(TPS::getTps)); + double averageCPUweek = MathUtils.averageDouble(week.stream().map(TPS::getCPUUsage)); + double averageCPUday = MathUtils.averageDouble(day.stream().map(TPS::getCPUUsage)); + addValue("averagetps", FormatUtils.cutDecimals(averageTPSweek)); addValue("averagetpsday", FormatUtils.cutDecimals(averageTPSday)); + + addValue("averagecpuweek", FormatUtils.cutDecimals(averageCPUweek)); + addValue("averagecpuday", FormatUtils.cutDecimals(averageCPUday)); } public List getTpsData() {