Skip to content

Commit

Permalink
Put this back
Browse files Browse the repository at this point in the history
  • Loading branch information
kathy-t committed Feb 26, 2024
1 parent cadb648 commit 28e6686
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ public List<RunExecution> getExecutionsFromExecutionRequestBody(ExecutionsReques
public Optional<M> getAggregatedMetricFromAllSubmissions(ExecutionsRequestBody allSubmissions) {
final List<RunExecution> workflowExecutions = new ArrayList<>(getExecutionsFromExecutionRequestBody(allSubmissions));

// Get aggregated metrics that were submitted to Dockstore
List<M> aggregatedMetrics = allSubmissions.getAggregatedExecutions().stream()
.map(this::getMetricFromMetrics)
.filter(Objects::nonNull)
.collect(Collectors.toCollection(ArrayList::new));

// If task executions are present, calculate the workflow RunExecution containing the overall workflow-level execution time for each list of tasks
if (!allSubmissions.getTaskExecutions().isEmpty()) {
final List<TaskExecutions> taskExecutionsWithMetric = getTaskExecutionsWithMetric(allSubmissions.getTaskExecutions());
Expand All @@ -68,6 +62,12 @@ public Optional<M> getAggregatedMetricFromAllSubmissions(ExecutionsRequestBody a
workflowExecutions.addAll(calculatedWorkflowExecutionsFromTasks);
}

// Get aggregated metrics that were submitted to Dockstore
List<M> aggregatedMetrics = allSubmissions.getAggregatedExecutions().stream()
.map(this::getMetricFromMetrics)
.filter(Objects::nonNull)
.collect(Collectors.toCollection(ArrayList::new));

// Aggregate workflow executions into one metric and add it to the list of aggregated metrics
Optional<M> aggregatedMetricFromWorkflowExecutions = getAggregatedMetricFromExecutions(workflowExecutions);
aggregatedMetricFromWorkflowExecutions.ifPresent(aggregatedMetrics::add);
Expand Down

0 comments on commit 28e6686

Please sign in to comment.