Sha256: 235bae9cfe5f18f3f19553f7612ea6bd8bd64abe5371fc8d5f1a00d5722e6b0f

Contents?: true

Size: 1.23 KB

Versions: 18

Compression:

Stored size: 1.23 KB

Contents

/**
 * Benchmark runner dependencies
 */

var colors = require('colors')
  , path = require('path');

/**
 * Find all the benchmarks
 */

var benchmarks_files = process.env.BENCHMARKS.split(' ')
  , all = [].concat(benchmarks_files)
  , first = all.shift()
  , benchmarks = {};

// find the benchmarks and load them all in our obj
benchmarks_files.forEach(function (file) {
  benchmarks[file] = require(path.join(__dirname, '..', file));
});

// setup the complete listeners
benchmarks_files.forEach(function (file) {
  var benchmark = benchmarks[file]
    , next_file = all.shift()
    , next = benchmarks[next_file];

  /**
   * Generate a oncomplete function for the tests, either we are done or we
   * have more benchmarks to process.
   */

   function complete () {
      if (!next) {
        console.log(
          '\n\nBenchmark completed in'.grey
        , (Date.now() - start).toString().green + ' ms'.grey
        );
      } else {
        console.log('\nStarting benchmark '.grey + next_file.yellow);
        next.run();
      }
   }

   // attach the listener
   benchmark.on('complete', complete);
});

/**
 * Start the benchmark
 */

var start = Date.now();
console.log('Starting benchmark '.grey + first.yellow);
benchmarks[first].run();

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
hooch-0.4.2 jasmine/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
hooch-0.4.1 jasmine/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
hooch-0.4.0 jasmine/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
hooch-0.3.0 jasmine/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
hooch-0.2.1 jasmine/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
hooch-0.2.0 jasmine/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
hooch-0.1.0 jasmine/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
hooch-0.0.8 jasmine/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
hooch-0.0.7 jasmine/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
hooch-0.0.6 jasmine/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
entangled-0.0.16 spec/dummy/public/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
entangled-0.0.15 spec/dummy/public/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
entangled-0.0.14 spec/dummy/public/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
entangled-0.0.13 spec/dummy/public/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
entangled-0.0.12 spec/dummy/public/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
entangled-0.0.11 spec/dummy/public/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
entangled-0.0.10 spec/dummy/public/node_modules/karma/node_modules/socket.io/benchmarks/runner.js
iron_worker_ng-0.10.1 iron_worker_examples/binary/phantom-nodejs/node_modules/phantom/node_modules/dnode/node_modules/socket.io/benchmarks/runner.js