Perfome
=======

[![Build Status](https://travis-ci.org/twokul/perfome.png?branch=master)](https://travis-ci.org/twokul/perfome)

CLI for running benchmarks.

### Installation

```bash
npm install -g perfome
```

### Running benchmarks

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

```bash
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:

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

Running benchmarks in the browser is similar:

```bash
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.

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

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

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

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

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

You can define custom normalizer, like so:

```json
{
  "normalizer": "path/to/custom/normalizer"
}
```

```javascript
export var implementations = [];
export function lookupFeature(implementation, feature) { }
```

Happy benchmarking!
