Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementWalter committed Sep 27, 2023
1 parent 7cd0c7d commit e1254d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gas_reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
continue-on-error: true
run: |
result=$(python tmp.py 2>&1)
result=$(python scripts/compare_snapshot.py 2>&1)
status=$(echo "$result" | tail -n 1 | awk -F ':' '{print $1}')
echo "$result" >> "$GITHUB_STEP_SUMMARY"
echo "status=$status" >> "$GITHUB_OUTPUT"
Expand Down
9 changes: 2 additions & 7 deletions scripts/compare_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,8 @@ def main():
current_snapshots = get_current_gas_snapshot()
improvements, worsened = compare_snapshots(current_snapshots, previous_snapshot)
cur_gas, prev_gas = total_gas_used(current_snapshots, previous_snapshot)
logger.info("****BETTER****")
for elem in improvements:
logger.info(elem)

logger.info("****WORST****")
for elem in worsened:
logger.info(elem)
logger.info("\n".join(["****BETTER****"] + improvements))
logger.info("\n".join(["****WORST****"] + worsened))

logger.info(f"Overall gas change: {(cur_gas - prev_gas) * 100 / prev_gas:.2%}")
if worsened:
Expand Down
7 changes: 0 additions & 7 deletions tmp.py

This file was deleted.

0 comments on commit e1254d5

Please sign in to comment.