Skip to content

Commit

Permalink
Adjust how compare_perf shows slowdown percentages
Browse files Browse the repository at this point in the history
  • Loading branch information
randombit committed Feb 21, 2025
1 parent 69ecdf6 commit 010ae3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripts/compare_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def ops_per_second(events, nanos):
return (events * 1000000000) / nanos

def format_pct(r):
assert r > 1
return "%.01f%%" % ((r - 1) * 100)
#assert r > 1
return "%.01f%%" % (abs(r - 1) * 100)

def parse_perf_report(report):
if len(report) == 0:
Expand Down

0 comments on commit 010ae3e

Please sign in to comment.