format stdout a bit better

This commit is contained in:
Andrew de Quincey 2021-05-18 01:20:19 +01:00
parent 2dfb4ed61e
commit 9137834b41

View File

@ -85,7 +85,7 @@ def logger(hostname, csvfile, noprofilestats, pidstats, stdout):
for k in list(msg.keys()):
v = msg[k]
if isinstance(v, float):
msg[k] = round(v, 3)
msg[k] = '{:5.3f}'.format(v)
csv_stdout.writerow(msg)
sys.stdout.flush()