We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4f46f8 commit 264b61dCopy full SHA for 264b61d
test/parse_benchmark_output.py
100644
100755
@@ -54,13 +54,20 @@
54
for i in range(1, len(line)):
55
line[i] = line[i] / base
56
57
+col0_width = max(len(r[0]) for r in matrix)
58
+
59
# filter results
60
result = []
-for line in matrix:
- if len(line) != len(matrix[0]):
61
- print('warning: not enough results, skipping line:', line[0])
+for i, row in enumerate(matrix):
62
+ if len(row) != len(matrix[0]):
63
+ print('warning: not enough results, skipping row:', row[0])
64
else:
- result += ['\t'.join([str(x) for x in line])]
65
+ line = '%*s ' % (col0_width, row[0])
66
+ if i == 0:
67
+ line += '\t'.join([str(x) for x in row[1:]])
68
+ else:
69
+ line += '\t'.join(['%.3f' % x for x in row[1:]])
70
+ result.append(line)
71
72
# print results
73
print()
0 commit comments