0.0.1 • Published 8 years ago

kiss-benchmark v0.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

# kiss-benchmark

installation wip

npm install --save-dev kiss-benchmark

usage

See tests

const benchmark = require('kiss-benchmark')

const slowBenchmark = () => { return Math.random() * 42 * Math.ceil(Math.PI * Math.random()) }
const fastBenchmark = () => 42
const benchmarkOptions = {maxRuns: 10000}

benchmark({
  name: 'benchmark-test-not-throws',
  fastBenchmark,
  slowBenchmark,
  options: {},
  failureMessage: 'my assumption is FALSE'
})

test

MAX_RUNS=25000000 npm t