(function (Benchmark, jIO, RSVP, rJS) {

var suite = new Benchmark.Suite;
var storage_elastic, storage_memory;

suite.add('elasticlunrstorage-create', function() {
  storage_elastic = jIO.createJIO({type: 'ElasticlunrStorage', keys: ['title', 'body']})
})
.add('elasticlunrstorage-put', function() {
  return storage_elastic.put('1', {title: 'bob', body: 'bog'})
})
.add('elasticlunrstorage-get', function() {
  return storage_elastic.get('1')
})
.add('memorystorage-create', function() {
  storage_memory = jIO.createJIO({type: 'memory'})
})
.add('memorystorage-put', function() {
  return storage_memory.put('1', {title: 'bob', body: 'bog'})
})
.add('memorystorage-get', function() {
  return storage_memory.get('1')
})

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

.run({ 'async': false });

}(Benchmark, jIO, RSVP, rJS))