[libc++] Escape spaces in GoogleBenchmark microbenchmarks
Otherwise we generate data that isn't valid according to the LNT format.
This commit is contained in:
parent
1287ed1fa2
commit
dbc96f41f1
@ -41,7 +41,10 @@ def main(argv):
|
||||
benchmark = headers.index('Benchmark')
|
||||
time = headers.index(args.timing)
|
||||
for row in rows:
|
||||
print(f'{row[benchmark].replace(".", "_")}.execution_time {row[time]}')
|
||||
# LNT format uses '.' to separate the benchmark name from the metric, and ' '
|
||||
# to separate the benchmark name + metric from the numerical value. Escape both.
|
||||
escaped = row[benchmark].replace(".", "_").replace(" ", "_")
|
||||
print(f'{escaped}.execution_time {row[time]}')
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv[1:])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user