Comments (9)
Just wanted to sanity check the forge snapshot --diff
feature. Here is what I currently use, it's:
forge snapshot && git diff --word-diff .gas-snapshot
Here's what forge snapshot --diff
produces:
It looks like the gas diff per case is computed as: case_change / total_gas_previous
which seems off, I would have expected it to be: case_change / case_previous
.
I would also argue that showing before, after, delta
is helpful but that may just be personal preference
from foundry.
@transmissions11 might be worth adding some checkboxes and editing it to link out to PRs once implemented. Mean and median gas on fuzz tests was added in #236
good idea, done. also added flamegraphs
from foundry.
Whats left on this? Table formatting?
from foundry.
I don't think any of this is done except gas for fuzzed tests?
from foundry.
Breakdown of not only gas usage of tests but gas usage of functions the tests call like hardhat-gas-reporter
This one is arguably implemented as you can see gas usage by function in traces, as in #192 (comment), but a report/snapshots showing this would be nice to have
Also I think flamegraphs should be added to this list, below is Tenderly's for reference
@transmissions11 might be worth adding some checkboxes and editing it to link out to PRs once implemented. Mean and median gas on fuzz tests was added in #236
from foundry.
Backref #1795
from foundry.
Is there a place to show Deployment Cost
diff right now?
Not sure if this is in the snapshot scope, but I will be happy if it's in snapshot diff.
I've been working to cut the contract size, tracking the size in snapshot helps.
from foundry.
Close-able? @mds1
from foundry.
Closing in favor of #2056
from foundry.
Related Issues (20)
- Include deployed libraries in `vm.stopAndReturnStateDiff()` results
- baseFeePerGas of the first mined block after anvil_reset equals block before anvil_reset HOT 1
- [Bug]: forge doc command failing
- Forge test `expectEmit` fails when it should succeed
- Failure on `vm.expectCall` is not catchable HOT 1
- Multi-threaded compilation
- forge test w/ --fork-url etherscan: Failed to deserialize response HOT 14
- Cheat codes not available to contracts deployed during invariant testing HOT 3
- Contract verification fails with dependency "File not found" in pnpm monorepo
- package installing error with forge. HOT 2
- Support for OpenBSD HOT 1
- Predeploy CreateX contract (like Nick's CREATE2 factory) HOT 1
- echo command in not working while calling a function from a .env file.
- UTF-8 with BOM file case a crash HOT 2
- Solc installation error while running forge build HOT 5
- Capacity Overflow During Invariant Testing HOT 4
- Download Issue and foundry not working HOT 6
- `--buffer` flag for `forge script` to adjust broadcast buffer size
- I'm testing a contract with foundry and i encountered this error HOT 1
- cast: `cast call --trace --block <block-number> <tx-hash>` doesn't respect block number parameter HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foundry.