diff options
author | lucko <git@lucko.me> | 2022-06-09 22:13:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-09 22:13:58 +0100 |
commit | 4a16a1a2f4eb09f706b4a541e3d31618de29420b (patch) | |
tree | cc320ee2e6551f2157a2d54968f8ba14f6713d08 /spark-common/src/main/java/me/lucko/spark/common/api | |
parent | 32ab78c71c5be97da7329a4f7c4035289a3490b1 (diff) | |
parent | ecc3714e6441ace0eb78156b2b4475ca050280db (diff) | |
download | spark-4a16a1a2f4eb09f706b4a541e3d31618de29420b.tar.gz spark-4a16a1a2f4eb09f706b4a541e3d31618de29420b.tar.bz2 spark-4a16a1a2f4eb09f706b4a541e3d31618de29420b.zip |
Merge pull request #213 from embeddedt/forge-1.7.10
Align 1.7.10 with Spark 1.9
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/common/api')
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/api/GarbageCollectorInfo.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/api/GarbageCollectorInfo.java b/spark-common/src/main/java/me/lucko/spark/common/api/GarbageCollectorInfo.java index 8d289aa..fc14c67 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/api/GarbageCollectorInfo.java +++ b/spark-common/src/main/java/me/lucko/spark/common/api/GarbageCollectorInfo.java @@ -36,10 +36,8 @@ public class GarbageCollectorInfo implements GarbageCollector { this.name = name; this.totalCollections = stats.getCollectionCount(); this.totalTime = stats.getCollectionTime(); - - double totalTimeDouble = this.totalTime; - this.averageTime = this.totalCollections == 0 ? 0 : totalTimeDouble / this.totalCollections; - this.averageFrequency = this.totalCollections == 0 ? 0 : (long) ((serverUptime - totalTimeDouble) / this.totalCollections); + this.averageTime = stats.getAverageCollectionTime(); + this.averageFrequency = stats.getAverageCollectionFrequency(serverUptime); } @Override |