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

feat: add median and mean gas to fuzz test result #236

Merged
merged 5 commits into from
Dec 15, 2021

Conversation

mattsse
Copy link
Member

@mattsse mattsse commented Dec 15, 2021

changes

  • introduce TestKind{Standard, Fuzz}, Fuzz stores all test cases (input, gas used)
  • gas_used doesn't need to be an Option anymore
  • updated snapshot output, Should diff compare fuzz cases as well? because there is a high chance, median or mean differ by +-1 or so

Fuzz gas formatting as (μ: <mean_gas>, ~: <median gas>)
image

Copy link
Member

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

so good

@gakonst gakonst merged commit 5d38938 into foundry-rs:master Dec 15, 2021
@gakonst
Copy link
Member

gakonst commented Dec 16, 2021

Noticed that this has a bug when there's early returns in the fuzz test, it counts them towards the gas count when they shouldn't be. ref #237

@mds1 mds1 mentioned this pull request Dec 27, 2021
8 tasks
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.

None yet

2 participants