Skip to content

Commit f750610

Browse files
ldionneLukacma
authored andcommitted
[libc++] Fix off-by-one error in compare-benchmarks script
That led us to overwrite the data of the last row with the geomean.
1 parent e323810 commit f750610

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/utils/compare-benchmarks

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def plain_text_comparison(data, metric, baseline_name=None, candidate_name=None)
7272
geomean_0 = statistics.geometric_mean(data[f'{metric}_0'].dropna())
7373
geomean_1 = statistics.geometric_mean(data[f'{metric}_1'].dropna())
7474
geomean_row = ['Geomean', geomean_0, geomean_1, (geomean_1 - geomean_0), (geomean_1 - geomean_0) / geomean_0]
75-
table.loc[table.index.max()] = geomean_row
75+
table.loc[table.index.max() + 1] = geomean_row
7676

7777
return tabulate.tabulate(table.set_index('benchmark'), headers=headers, floatfmt=fmt, numalign='right')
7878

0 commit comments

Comments
 (0)