summaryrefslogtreecommitdiffstats
path: root/bench/index.js
blob: 3e357e54a7e54ecd7aeb9a914f6c907052e797b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var fs = require('fs');

var metrics = fs.readdirSync(__dirname);
metrics.forEach(function(metric) {
  if (metric === 'index.js' || !(/(.*)\.js$/.test(metric))) {
    return;
  }

  var name = RegExp.$1;
  metric = require('./' + name);
  if (metric instanceof Function) {
    module.exports[name] = metric;
  }
});