This is an opinionated wrapper for benchmarked.js to make it easier to do benchmarks using glob patterns. Concept is from remarkable
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.
{%= apidocs("index.js") %}