Skip to content

Commit

Permalink
Fix empty ALL metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
kathy-t committed Oct 30, 2024
1 parent 8542e57 commit eef599d
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,14 @@ public Map<String, M> createMetricByPlatform(AthenaTablePartition partition) {
LOG.error("Could not execute query for partition {}", partition, e);
return Map.of();
}
return createMetricByPlatform(queryResultRows);

Map<String, M> metricByPlatform = createMetricByPlatform(queryResultRows);

Check warning on line 88 in metricsaggregator/src/main/java/io/dockstore/metricsaggregator/helper/AthenaAggregator.java

View check run for this annotation

Codecov / codecov/patch

metricsaggregator/src/main/java/io/dockstore/metricsaggregator/helper/AthenaAggregator.java#L88

Added line #L88 was not covered by tests
// Check that metrics exist for actual platforms. May end up with metrics for only 'ALL' if there are no executions of that type
// because null platform values are coalesced to 'ALL'.
if (metricByPlatform.size() == 1 && metricByPlatform.containsKey(Partner.ALL.name())) {
return Map.of();

Check warning on line 92 in metricsaggregator/src/main/java/io/dockstore/metricsaggregator/helper/AthenaAggregator.java

View check run for this annotation

Codecov / codecov/patch

metricsaggregator/src/main/java/io/dockstore/metricsaggregator/helper/AthenaAggregator.java#L92

Added line #L92 was not covered by tests
}
return metricByPlatform;

Check warning on line 94 in metricsaggregator/src/main/java/io/dockstore/metricsaggregator/helper/AthenaAggregator.java

View check run for this annotation

Codecov / codecov/patch

metricsaggregator/src/main/java/io/dockstore/metricsaggregator/helper/AthenaAggregator.java#L94

Added line #L94 was not covered by tests
}

public void printQuery(AthenaTablePartition partition) {
Expand Down

0 comments on commit eef599d

Please sign in to comment.