fix hard coded target objective

This commit is contained in:
yangdsh 2020-01-21 01:57:20 +00:00 committed by Dana Van Aken
parent 6b78b8a131
commit 389174302f
1 changed files with 1 additions and 1 deletions

View File

@ -928,7 +928,7 @@ def get_workload_data(request):
results = Result.objects.filter(workload=workload) results = Result.objects.filter(workload=workload)
result_data = {r.pk: JSONUtil.loads(r.metric_data.data) for r in results} result_data = {r.pk: JSONUtil.loads(r.metric_data.data) for r in results}
results = sorted(results, key=lambda x: int(result_data[x.pk][target_objectives.THROUGHPUT])) results = sorted(results, key=lambda x: int(result_data[x.pk][session.target_objective]))
default_metrics = [session.target_objective] default_metrics = [session.target_objective]
metrics = request.GET.get('met', ','.join(default_metrics)).split(',') metrics = request.GET.get('met', ','.join(default_metrics)).split(',')