From 61ccfb8d314f0e11a3a4ee927f2024ae9cc309e0 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 7 Jan 2023 14:00:54 -0500 Subject: [PATCH] test(benchmark): more reasonable numeric displays --- lab/benchmark/benchmark.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lab/benchmark/benchmark.py b/lab/benchmark/benchmark.py index af0e33cfd..4acebefef 100644 --- a/lab/benchmark/benchmark.py +++ b/lab/benchmark/benchmark.py @@ -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))