Skip to content

Commit

Permalink
Sort build times for the whole reactor by decreasing total time (#829)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet authored Apr 6, 2023
1 parent 60af0f0 commit eef6c2f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ private void doReport(boolean output) {
});
});
log.accept(DIVIDER);
mojos.forEach((name, duration) -> log.accept(String.format(" %s [%.3fs]", name, duration / 1000d)));
mojos.entrySet().stream()
.sorted(Comparator.<Map.Entry<String, Long>>comparingLong(Entry::getValue)
.reversed()
.thenComparing(Map.Entry::getKey))
.forEach(e -> log.accept(String.format(" %s [%.3fs]", e.getKey(), e.getValue() / 1000d)));
}

private static class Session {
Expand Down

0 comments on commit eef6c2f

Please sign in to comment.