var memdiff = require('memdiff')
  , EE = require('./');

var ee = new EE();

function leaking(){
  ee.once('leaking', function foo() {}).emit('leaking', 'bar');
}

memdiff({
  loop: leaking,
  duration: 25,
  interval: 5,
  times: 1000
}, function(result){ // or memdiff({ fn: leaking, duration: 15, times: 9999, interval: 1 ....
  console.log('leaking: ', result.size);
});
