Skip to content

Gas snapshotting wishlist #137

Closed
Closed
@transmissions11

Description

@transmissions11
  • Account for gas refunds! OG tools does not right now.

  • Don't include test call overhead in gas snapshots. OG tools includes some of the overhead rn:

Screen Shot 2021-11-16 at 4 42 42 PM

Screen Shot 2021-11-16 at 4 42 21 PM

  • - --diff flag that shows how much gas usage changed from the last snapshot

    • Summarizes % change of aggregated gas usage across all test funcs
    • Leaderboard for which tests' gas usage changed the most (by %).
      • Show gas units diff and % diff
  • - Gas snapshots for fuzz tests

    • Median & mean
    • Gas usage per range of inputs like:
testAddThatExitsEarlyOnLargeNumbers(100-500) = ~5000 gas
testAddThatExitsEarlyOnLargeNumbers(500+) = ~100 gas
  • Breakdown of not only gas usage of tests but gas usage of functions the tests call like hardhat-gas-reporter

image

related: dapphub/dapptools#761

  • flamegraphs like tenderly

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions