Add summary row for performance benchmark.

This commit is contained in:
Ferdinand Mütsch 2019-10-07 21:28:25 +02:00 committed by Marc Garcia Puig
parent e02520c835
commit 722e258902
1 changed files with 10 additions and 0 deletions

View File

@ -247,10 +247,20 @@ def serialize_records(records, system_specs, filename):
record['fps_std'])
fd.write(s)
s = "| | | | | **{:03.2f}** | **{:03.2f}** |\n".format(*get_total(records))
fd.write(s)
s = "Table: {}.\n".format(system_specs)
fd.write(s)
def get_total(records):
record_vals = [item for sublist in records.values() for item in sublist]
total_mean_fps = sum([r['fps_mean'] for r in record_vals]) / len(record_vals)
total_mean_std = sum([r['fps_std'] for r in record_vals]) / len(record_vals)
return total_mean_fps, total_mean_std
def get_system_specs():
str_system = ""
cpu_info = cpuinfo.get_cpu_info()