var Benchmark = require('benchmark')

var suite = new Benchmark.Suite('async', { /*minSamples: 100*/ })

function body (async) { async()(null, 1) }

var interrupt = require('../interrupt').createInterrupter('x')

function fn () {
    interrupt('x')
}

var interrupt_ = require('../bootstrap_').createInterrupterCreator(Error)('x')

function fn_ () {
    interrupt_('x')
}

for (var i = 1; i <= 4; i++)  {
    suite.add({
        name: 'interrupt  stack ' + i,
        fn: fn
    })

    suite.add({
        name: 'interrupt_ stack ' + i,
        fn: fn_
    })
}

suite.on('cycle', function(event) {
    console.log(String(event.target));
})

suite.on('complete', function() {
    console.log('Fastest is ' + this.filter('fastest').map('name'));
})

suite.run()

@@ -102,52 +102,8 @@
 %7D)%0A%0A
-function body (async) %7B async()(null, 1) %7D%0A%0A
 var 
@@ -126,25 +126,25 @@
 ire('../
-interrupt
+bootstrap
 ').creat
@@ -155,16 +155,30 @@
 errupter
+Creator(Error)
 ('x')%0A%0Af

Tidy benchmarks.