Generate an HTML file for running benchmarks.
var build = require( '@stdlib/tools/benchmarks/html' );Given a bundle URL from which to load a benchmarks bundle, returns an HTML file for running benchmarks.
var bundle = '/foo/bar/bundle.js';
build( bundle, clbk );
function clbk( error, html ) {
if ( error ) {
throw error;
}
console.log( html );
}The function accepts the following options:
- out: output file path.
- title: HTML title. Default:
'Benchmarks'.
To specify an output file path, set the out option.
var bundle = '/foo/bar/bundle.js';
var opts = {
'out': '/foo/bar/benchmarks.html'
};
build( bundle, opts, clbk );
function clbk( error ) {
if ( error ) {
throw error;
}
}var build = require( '@stdlib/tools/benchmarks/html' );
build( '/foo/bar/bundle.js', onBuild );
function onBuild( error, html ) {
if ( error ) {
throw error;
}
console.log( html );
}Usage: benchmarks-html [options] url
Options:
-h, --help Print this message.
-V, --version Print the package version.
--title title HTML title.$ benchmarks-html /foo/bar/beep.js