diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2023-01-07 14:00:54 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2023-01-07 15:40:03 -0500 |
commit | 61ccfb8d314f0e11a3a4ee927f2024ae9cc309e0 (patch) | |
tree | 4b96cafcc5461bf1da2c780c0a9b9e3ac3b774ed /lab | |
parent | 2fa45d693de8861fcf84ee9cec85d6ab46203ac6 (diff) | |
download | python-coveragepy-git-61ccfb8d314f0e11a3a4ee927f2024ae9cc309e0.tar.gz |
test(benchmark): more reasonable numeric displays
Diffstat (limited to 'lab')
-rw-r--r-- | lab/benchmark/benchmark.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lab/benchmark/benchmark.py b/lab/benchmark/benchmark.py index af0e33cf..4acebefe 100644 --- a/lab/benchmark/benchmark.py +++ b/lab/benchmark/benchmark.py @@ -541,11 +541,11 @@ class Experiment: 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)) |