Skip to content
Snippets Groups Projects

Benchmarking reports hotfix

8 files
+ 18
11
Compare changes
  • Side-by-side
  • Inline

Files

@@ -162,8 +162,6 @@ public class Benchmarker {
* @param level the level of the entity to analyze (filters all other entities)
* @return a map of value -> total relative weights
*
* @throws MissingMetricException if an entity unexpectedly does not contain the metric which
* is to be aggregated
* @throws IllegalArgumentException if the project entity is missing
*/
public Map<Integer, List<Entity>> aggregateWithEntities(
@@ -183,11 +181,14 @@ public class Benchmarker {
c -> {
var metric = c.getMetricList().stream()
.filter(m -> m.getName() == name)
.findFirst()
.orElseThrow(MissingMetricException::new);
final var metricValue = (Integer) metric.getValue();
aggregatedMetrics.computeIfAbsent(metricValue,
entityList -> new ArrayList<>()).add(c);
.findFirst();
if (metric.isEmpty()) {
logger.warn("No {} metric for entity {}", name.name(), c.getName());
} else {
final var metricValue = (Integer) metric.get().getValue();
aggregatedMetrics.computeIfAbsent(metricValue,
entityList -> new ArrayList<>()).add(c);
}
}
);
return aggregatedMetrics;
Loading