Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 841 Bytes

.verb.md

File metadata and controls

25 lines (20 loc) · 841 Bytes

This is an opinionated wrapper for benchmarked.js to make it easier to do benchmarks using glob patterns. Concept is from remarkable

Usage

const Suite = require('{%= name %}');
const suite = new Suite({
  cwd: 'benchmark', // optionally define a base directory for code and fixtures
  fixtures: 'my-fixtures/*.txt', // path or glob pattern to fixtures
  code: 'my-functions/*.js', // path or glob pattern to code files
  format: function(benchmark) {
    // optionally override default formatting.
    // return a string.
    // see examples/basic.js for a real example.
  }
});

// run the benchmarks
suite.run();

See the examples to get a better understanding of how this works.

API

{%= apidocs("index.js") %}