aboutsummaryrefslogtreecommitdiff
path: root/spark-common/src
diff options
context:
space:
mode:
Diffstat (limited to 'spark-common/src')
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/sampler/ThreadNodeOrder.java4
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());
}
}