hardhat-gas-reporter
hardhat-gas-reporter copied to clipboard
Gas report not shown per unit tests
Hello,
My npx hardhat test
command doesn't generate gas report per unit tests,
But instead, it will only show the gas report at the end of the test.
How to enable this?
Thanks.
My hardhat config btw
gasReporter: {
enabled: true,
currency: 'USD',
showMethodSig: true,
},
Same problem, only can get time spent on specific function by adding showTimeSpent: true
Same problem, with a sample Hardhat setup, and I do not get the gas cost per unit test.
with Hardhat ❌
However, with truffle, I do get the gas cost per unit test (in the screenshot below, the unit tests not showing the gas cost only use view functions, therefore the reason no gas costs are reported):
with Truffle ✅
got same problem. hardhat is running in forked mode
hardhat: 2.9.9 hardhat-gas-reporter: 1.0.8
Same problem, only can get time spent on specific function by adding
showTimeSpent: true
true
interesting that gas outputs when testing against ropsten
Got same problem here
same problem here
ever figure this out?
"hardhat-gas-reporter": "^1.0.9",
not reporting gas per test
Apologies, this behavior was only available in eth-gas-reporter and it slows the plugin down enormously because it has to use sync network calls to work with the mocha reporter.
Am going to add additional tasks in v2.0 that let you add gas tracking to any hardhat script and look at different scenario costs.
Closing for now....