Skip to content

Commit c3f894b

Browse files
committed
Fix single worker case not having "All clients" log section
1 parent ec49b70 commit c3f894b

File tree

1 file changed

+6
-1
lines changed
  • python/perftest/models/v1alpha1

1 file changed

+6
-1
lines changed

python/perftest/models/v1alpha1/fio.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,12 @@ def summarise(self):
281281
except:
282282
raise PodLogFormatError("pod log is not of the expected format")
283283

284-
aggregate_data = [i for i in fio_json['client_stats'] if i['jobname'] == 'All clients'][0]
284+
if len(fio_json['client_stats']) == 1:
285+
# Single worker, single process doesn't have an
286+
# 'All clients' log section
287+
aggregate_data = fio_json['client_stats'][0]
288+
else:
289+
aggregate_data = [i for i in fio_json['client_stats'] if i['jobname'] == 'All clients'][0]
285290

286291
self.status.result = FioResult(
287292
read_bw = aggregate_data['read']['bw'],

0 commit comments

Comments
 (0)