Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved --gas report #543

Merged
merged 4 commits into from
May 23, 2020

Conversation

matnad
Copy link
Collaborator

@matnad matnad commented May 23, 2020

What I did

grouped by contract
sorted by average gas
padded for table-like view

Gas Profile:
BrownieTester <Contract>
   ├─ constructor   -  avg: 1099591  low: 1099591  high: 1099591
   ├─ sendEth       -  avg:   23017  low:   23017  high:   23017
   └─ doNothing     -  avg:   21437  low:   21437  high:   21437
EVMTester <Contract>
   ├─ constructor   -  avg:  711445  low:  711445  high:  711445
   └─ modulusByZero -  avg:   21658  low:   21658  high:   21658

Closes #536

How I did it

String formatting

How to verify it

python -m pytest tests/test/plugin/test_output.py::test_print_gas --target plugin -n 0 -s --no-cov

Checklist

  • I have confirmed that my PR passes all linting checks
  • I have included test cases
  • I have updated the documentation
  • I have added an entry to the changelog

@codecov-commenter
Copy link

codecov-commenter commented May 23, 2020

Codecov Report

Merging #543 into master will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #543      +/-   ##
==========================================
+ Coverage   88.40%   88.47%   +0.07%     
==========================================
  Files          56       56              
  Lines        6259     6276      +17     
  Branches     1381     1386       +5     
==========================================
+ Hits         5533     5553      +20     
+ Misses        496      494       -2     
+ Partials      230      229       -1     
Impacted Files Coverage Δ
brownie/test/output.py 92.51% <100.00%> (+0.97%) ⬆️
brownie/test/coverage.py 100.00% <0.00%> (+6.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f111fef...f1deb5f. Read the comment docs.

Copy link
Member

@iamdefinitelyahuman iamdefinitelyahuman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Would you mind rebasing off master rather than merging though?

@iamdefinitelyahuman iamdefinitelyahuman merged commit 900567a into eth-brownie:master May 23, 2020
@matnad matnad deleted the sort---gas-output branch December 28, 2020 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Organize --gas output by contract name
3 participants