Skip to content

Commit

Permalink
docs: added section for gas report
Browse files Browse the repository at this point in the history
  • Loading branch information
matnad committed May 23, 2020
1 parent a43b5f1 commit f1deb5f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/tests-pytest-intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,33 @@ Once you are finished, type ``quit()`` to continue with the next test.
See :ref:`Inspecting and Debugging Transactions <core-transactions>` for more information on Brownie's debugging functionality.
Evaluating Gas Usage
--------------------
To generate a gas profile report, add the ``--gas`` flag:
::
$ brownie test --gas
When the tests complete, a report will display:
::
Gas Profile:
Token <Contract>
├─ constructor - avg: 1099591 low: 1099591 high: 1099591
├─ transfer - avg: 43017 low: 43017 high: 43017
└─ approve - avg: 21437 low: 21437 high: 21437
Storage <Contract>
├─ constructor - avg: 211445 low: 211445 high: 211445
└─ set - avg: 21658 low: 21658 high: 21658
Evaluating Coverage
-------------------
Expand Down

0 comments on commit f1deb5f

Please sign in to comment.