perfome

CLI for running benchmarks

Usage no npm install needed!

<script type="module">
  import perfome from 'https://cdn.skypack.dev/perfome';
</script>

README

Perfome

Build Status

CLI for running benchmarks.

Installation

npm install -g perfome

Running benchmarks

You can run the benchmarks using command line, as follows:

perfome node --folder path/to/the/folder

Perfome will assume that you have implementations and benchmarks folders under your "performance-folder". If you want to have custom folder in place (for benchmarks and implementations), you can do:

perfome node --implementations path/to/the/implementations --benchmarks path/to/the/benchmarks

Running benchmarks in the browser is similar:

perfome browser --folder path/to/the/folder

or

perfome browser --implementations path/to/the/implementations --benchmarks path/to/the/benchmarks

perfome.json

If you don't want to specify command line arguments every time you run benchmarks, you will need to create perfome.json file.

{
  "folder": "path/to/the/folder"
}

If you want to keep your henchmarks and implementations separately, you could:

{
  "implementations": "path/to/implementations/folder",
  "benchmarks": "path/to/benchmarks/folder"
}

You can define custom implementations and benchmarks files' matchers, like so:

{
  "implementationsMatcher": "**/*cjs.js",
  "benchmarksMatcher": "**/*.js"
}

You can define custom normalizer, like so:

{
  "normalizer": "path/to/custom/normalizer"
}
export var implementations = [];
export function lookupFeature(implementation, feature) { }

Happy benchmarking!