From 8616d392ae75e3f41afb444326c0a9ead3ae5fe6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 19 Oct 2021 21:46:29 +0100 Subject: [PATCH] Performance group --- fitnessFunctions.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fitnessFunctions.py b/fitnessFunctions.py index 95ee9b630..b84ed268c 100644 --- a/fitnessFunctions.py +++ b/fitnessFunctions.py @@ -48,10 +48,12 @@ def fitnessPerformance(startTime, fitnessState: {}, def sortedWatchPoints(fitness: {}, fitnessId: str) -> []: """Returns a sorted list of watchpoints """ - if not fitness.get(fitnessId): + if not fitness.get('performance'): + return [] + if not fitness['performance'].get(fitnessId): return [] result = [] - for watchPoint, item in fitness[fitnessId].items(): + for watchPoint, item in fitness['performance'][fitnessId].items(): if not item.get('total'): continue averageTime = item['total'] / item['ctr']