{"size": 605, "ext": "js", "max_stars_repo_path": "bench/basic.js", "max_stars_repo_name": "mcollina/mu", "max_stars_repo_stars_event_min_datetime": "2016-08-24T21:32:36.000Z", "max_stars_repo_stars_event_max_datetime": "2019-06-12T19:21:01.000Z", "max_issues_repo_path": "bench/basic.js", "max_issues_repo_name": "mcollina/mu", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "bench/basic.js", "max_forks_repo_name": "mcollina/mu", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.2857142857, "max_line_length": 38, "alphanum_fraction": 0.5950413223}
'use strict'

const fastbench = require('fastbench')

const seneca = require('seneca')()
seneca.add({
  hello: 'world'
}, function (msg, cb) {
  cb(null, { something: 'else' })
})

const mu = require('..')()
mu.match({
  hello: 'world'
}, function (ctx, msg, cb) {
  cb(null, { something: 'else' })
})

const run = fastbench([
  function callNextTick (cb) {
    process.nextTick(cb)
  },
  function callSetImmediate (cb) {
    setImmediate(cb)
  },
  function actSeneca (cb) {
    seneca.act({ hello: 'world' }, cb)
  },
  function actMu (cb) {
    mu.send({ hello: 'world' }, cb)
  }
], 10000)

run(run)
