diff options
Diffstat (limited to 'vnfmarket/src/main/webapp/vnfmarket/node_modules/socket.io/benchmarks/runner.js')
-rw-r--r-- | vnfmarket/src/main/webapp/vnfmarket/node_modules/socket.io/benchmarks/runner.js | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/vnfmarket/src/main/webapp/vnfmarket/node_modules/socket.io/benchmarks/runner.js b/vnfmarket/src/main/webapp/vnfmarket/node_modules/socket.io/benchmarks/runner.js deleted file mode 100644 index 81e55cae..00000000 --- a/vnfmarket/src/main/webapp/vnfmarket/node_modules/socket.io/benchmarks/runner.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * 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(); |