diff options
author | Luck <git@lucko.me> | 2020-01-02 20:04:27 +0000 |
---|---|---|
committer | Luck <git@lucko.me> | 2020-01-02 20:04:27 +0000 |
commit | 47c65e9c64ec387f845eac5784d86d9685d8ea71 (patch) | |
tree | 33789c8b82039f17e747b6250bdea4651951871d /spark-common/src/main/java/me/lucko/spark | |
parent | e55c2884e2e16340920d062a917caa2ed6c755c8 (diff) | |
download | spark-47c65e9c64ec387f845eac5784d86d9685d8ea71.tar.gz spark-47c65e9c64ec387f845eac5784d86d9685d8ea71.tar.bz2 spark-47c65e9c64ec387f845eac5784d86d9685d8ea71.zip |
Order with most time taken first
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark')
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/sampler/ThreadNodeOrder.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/sampler/ThreadNodeOrder.java b/spark-common/src/main/java/me/lucko/spark/common/sampler/ThreadNodeOrder.java index 3765314..4fa8ff4 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/sampler/ThreadNodeOrder.java +++ b/spark-common/src/main/java/me/lucko/spark/common/sampler/ThreadNodeOrder.java @@ -41,12 +41,12 @@ public enum ThreadNodeOrder implements Comparator<Map.Entry<String, ThreadNode>> }, /** - * Order by the time taken by the thread + * Order by the time taken by the thread (most time taken first) */ BY_TIME { @Override public int compare(Map.Entry<String, ThreadNode> o1, Map.Entry<String, ThreadNode> o2) { - return Double.compare(o1.getValue().getTotalTime(), o2.getValue().getTotalTime()); + return -Double.compare(o1.getValue().getTotalTime(), o2.getValue().getTotalTime()); } } |