Skip to content

Commit

Permalink
Avoid returning duplicated KPIs
Browse files Browse the repository at this point in the history
  • Loading branch information
NaniteBased committed Nov 9, 2022
1 parent 571f315 commit 7bcce1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Scheduler/execution/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ def kpis(executionId: int):
execution = executionOrTombstone(executionId)

if execution is not None:
kpis = []
kpis = set()
descriptor = ExperimentDescriptor(execution.JsonDescriptor)
for testcase in sorted(descriptor.TestCases):
kpis.extend(Facility.GetTestCaseKPIs(testcase))
for testcase in descriptor.TestCases:
kpis.update(Facility.GetTestCaseKPIs(testcase))

return jsonify({"KPIs": kpis})
return jsonify({"KPIs": sorted(kpis)})
else:
return f"Execution {executionId} not found", 404

Expand Down

0 comments on commit 7bcce1e

Please sign in to comment.