Performance group

main
Bob Mottram 2021-10-19 21:46:29 +01:00
parent ebac89fb82
commit 8616d392ae
1 changed files with 4 additions and 2 deletions

View File

@ -48,10 +48,12 @@ def fitnessPerformance(startTime, fitnessState: {},
def sortedWatchPoints(fitness: {}, fitnessId: str) -> []: def sortedWatchPoints(fitness: {}, fitnessId: str) -> []:
"""Returns a sorted list of watchpoints """Returns a sorted list of watchpoints
""" """
if not fitness.get(fitnessId): if not fitness.get('performance'):
return []
if not fitness['performance'].get(fitnessId):
return [] return []
result = [] result = []
for watchPoint, item in fitness[fitnessId].items(): for watchPoint, item in fitness['performance'][fitnessId].items():
if not item.get('total'): if not item.get('total'):
continue continue
averageTime = item['total'] / item['ctr'] averageTime = item['total'] / item['ctr']