Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eth-gas-reporter

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eth-gas-reporter

Mocha reporter which shows gas used per unit test.

  • 0.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
91K
decreased by-4.15%
Maintainers
1
Weekly downloads
 
Created
Source

eth-gas-reporter

Gas usage per unit test. Average gas usage per method. A mocha reporter.

screen shot 2017-10-12 at 8 02 57 pm

Install

// Truffle/mocha installed globally
npm install -g eth-gas-reporter

// Truffle/mocha installed locally
npm install --save-dev eth-gas-reporter

Configure for truffle

module.exports = {
  networks: {
    development: {
      host: "localhost",
      port: 8545,
      network_id: "*" // Match any network id
    }
  },
  mocha: {
    reporter: 'eth-gas-reporter'
  }
};

Thanks

Everything here has been cannibalized from elsewhere and dropped into mocha's reporter facility. Many thanks to:

  • @maurelian - once posted a slack picture of mocha reporting gas output instead time. Idea from him.
  • @cag - wrote a really nice gas stats utility for the Gnosis suites. The table borrows from / is based his work.
  • Neufund - expressing gas usage as a ratio of the block limit in their ico suite. That comes from them.

Keywords

FAQs

Package last updated on 14 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc