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

Add vm.assume metrics #1154

Merged
merged 2 commits into from
Apr 14, 2023
Merged

Add vm.assume metrics #1154

merged 2 commits into from
Apr 14, 2023

Conversation

horsefacts
Copy link
Contributor

Collect metrics on usage of vm.assume. Rather than using Foundry vm.assume, import { assume } from './VmUtils.sol' and use it just like vm.assume with an extra string argument:

assume(frobs > 0, "no_frobs");

"no_frobs" will be collected as a counter metric in assume-metrics.txt.

Run yarn test:fuzz:metrics assume-metrics.txt to generate a visualization.

Also:

  • Extract metrics loggers to Metrics.sol
  • Fixes some compiler warnings (unused args, mutability)

@codecov-commenter
Copy link

codecov-commenter commented Apr 14, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (3caa72c) 100.00% compared to head (832df19) 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff            @@
##               1.5     #1154   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           46        46           
  Lines         2652      2652           
  Branches       396       396           
=========================================
  Hits          2652      2652           
Flag Coverage Δ
foundry 77.80% <ø> (ø)
production 100.00% <ø> (ø)
reference 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@0age 0age merged commit 00d9290 into 1.5 Apr 14, 2023
@0age 0age deleted the horsefacts/vm-metrics branch April 14, 2023 23:40
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.

3 participants