Skip to content

Commit 536cfb2

Browse files
merge
2 parents 252affc + ad813f7 commit 536cfb2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/scripts/merge_runs.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,19 @@
1212
with open(args.input) as csv_file:
1313
csv_reader = csv.reader(csv_file)
1414
next(csv_reader)
15-
for name, time, _, _ in csv_reader:
15+
for row in csv_reader:
16+
name = row[2]
17+
time = float(row[3])
1618
if name in time_dict.keys():
17-
time_dict[name].append(float(time))
19+
time_dict[name].append(time)
1820
else:
19-
time_dict[name] = [float(time)]
21+
time_dict[name] = [time]
2022

2123
data = [["name", "time", "stdev"]]
2224
for name, time_list in time_dict.items():
2325
mean = statistics.mean(time_list[args.discard:])
24-
stdev = statistics.stdev(time_list[args.discard:])
26+
runs = len(time_list[args.discard:])
27+
stdev = 0.0 if runs == 1 else statistics.stdev(time_list[args.discard:])
2528
data.append([name, mean, stdev])
2629

2730
with open(args.output, 'w') as csv_file:

0 commit comments

Comments
 (0)