(name, *items)
| 107 | width = header + digits * (1 + len(self.percentages)) |
| 108 | |
| 109 | def tab_row(name, *items): |
| 110 | |
| 111 | def fmt(x): |
| 112 | return '{:>{d}.3f}'.format(x, d=digits) if isinstance(x, float) else '{:>{d}}'.format(x, d=digits) |
| 113 | |
| 114 | print('{:<{p}}{}'.format(name, ''.join([fmt(x) for x in items]), p=header)) |
| 115 | |
| 116 | print('\n{s:{c}^{n}}'.format(s=f' {title} ', n=width, c='=')) |
| 117 | tab_row('Benchmark duration', self.elapsed_time) |