var Benchmark = require("benchmark");

module.exports = function() {
  var suite = new Benchmark.Suite();

  for (var i = 0; i < arguments.length; i++) {
    suite.add(arguments[i].name, {
      defer: true,
      fn: arguments[i].test
    });
  }

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

  .on("complete", function() {
    console.log("Fastest is " + this.filter("fastest").pluck("name"));
  })

  .run({ "async": true });
};

