Skip to content

Commit

Permalink
Fix percentage in snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementWalter committed Sep 27, 2023
1 parent db0ee30 commit 7d090e3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/compare_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ def compare_snapshots(current, previous):
for key in common_keys:
prev = previous[key]
cur = current[key]
percentage_change = (cur - prev) * 100 / prev
log = f"{key:<{max_key_len + 5}} {prev:>10} {cur:>10} {percentage_change:>6.2%}"
log = f"{key:<{max_key_len + 5}} {prev:>10} {cur:>10} {cur / prev:>6.2%}"
if prev < cur:
worsened.append(log)
elif prev > cur:
Expand Down

0 comments on commit 7d090e3

Please sign in to comment.