Add summary row for performance benchmark.
This commit is contained in:
parent
e02520c835
commit
722e258902
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue