[libcxx-commits] [libcxx] fcb1a82 - [libc++] Fix off-by-one error in compare-benchmarks script
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Oct 20 14:00:32 PDT 2025
Author: Louis Dionne
Date: 2025-10-20T17:00:22-04:00
New Revision: fcb1a82811490ca581b4db484a2b67be86650a84
URL: https://github.com/llvm/llvm-project/commit/fcb1a82811490ca581b4db484a2b67be86650a84
DIFF: https://github.com/llvm/llvm-project/commit/fcb1a82811490ca581b4db484a2b67be86650a84.diff
LOG: [libc++] Fix off-by-one error in compare-benchmarks script
That led us to overwrite the data of the last row with the geomean.
Added:
Modified:
libcxx/utils/compare-benchmarks
Removed:
################################################################################
diff --git a/libcxx/utils/compare-benchmarks b/libcxx/utils/compare-benchmarks
index d165c739183d4..b5bd8805df9d5 100755
--- a/libcxx/utils/compare-benchmarks
+++ b/libcxx/utils/compare-benchmarks
@@ -72,7 +72,7 @@ def plain_text_comparison(data, metric, baseline_name=None, candidate_name=None)
geomean_0 = statistics.geometric_mean(data[f'{metric}_0'].dropna())
geomean_1 = statistics.geometric_mean(data[f'{metric}_1'].dropna())
geomean_row = ['Geomean', geomean_0, geomean_1, (geomean_1 - geomean_0), (geomean_1 - geomean_0) / geomean_0]
- table.loc[table.index.max()] = geomean_row
+ table.loc[table.index.max() + 1] = geomean_row
return tabulate.tabulate(table.set_index('benchmark'), headers=headers, floatfmt=fmt, numalign='right')
More information about the libcxx-commits
mailing list