Skip to content

Commit

Permalink
test(benchmark): more reasonable numeric displays
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Jan 7, 2023
1 parent 2fa45d6 commit 61ccfb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lab/benchmark/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,11 @@ def as_table_row(vals):
key = (*tup, col)
key = tuple(key[i] for i in remap)
result_time = self.result_data[key] # type: ignore
row.append(f"{result_time:.3f} s")
row.append(f"{result_time:.1f} s")
col_data[col] = result_time
for _, num, denom in ratios:
ratio = col_data[num] / col_data[denom]
row.append(f"{ratio * 100:.2f}%")
row.append(f"{ratio * 100:.0f}%")
print(as_table_row(row))


Expand Down

0 comments on commit 61ccfb8

Please sign in to comment.