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;