}
determineRanking(successSingleBenchmarkList);
}
private void determineRanking(List<SingleBenchmark> rankedSingleBenchmarkList) {
Comparator singleBenchmarkRankingComparator = new SingleBenchmarkRankingComparator();
Collections.sort(rankedSingleBenchmarkList, Collections.reverseOrder(singleBenchmarkRankingComparator));
int ranking = 0;
SingleBenchmark previousSingleBenchmark = null;
int previousSameRankingCount = 0;
for (SingleBenchmark singleBenchmark : rankedSingleBenchmarkList) {
if (previousSingleBenchmark != null
&& singleBenchmarkRankingComparator.compare(previousSingleBenchmark, singleBenchmark) != 0) {
ranking += previousSameRankingCount;
previousSameRankingCount = 0;
}
singleBenchmark.setRanking(ranking);
previousSingleBenchmark = singleBenchmark;