From 99aa9ab0d187b7ecad409c64a630df333492e060 Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Sun, 14 Feb 2016 02:57:56 +0800 Subject: [PATCH] common storage for benchmark file details --- backtest.js | 14 +------------- benchmark.js | 14 +------------- benchmarks/index.json | 13 +++++++++++++ 3 files changed, 15 insertions(+), 26 deletions(-) create mode 100644 benchmarks/index.json diff --git a/backtest.js b/backtest.js index 2a154ab..6b1d6e8 100644 --- a/backtest.js +++ b/backtest.js @@ -6,19 +6,7 @@ var child_process = require('child_process'), fs = require('fs'), path = require('path'); -var urls = { - amazon: 'http://www.amazon.com/', - eloquentjavascript: 'http://eloquentjavascript.net/print.html', - es6: 'https://people.mozilla.org/~jorendorff/es6-draft.html', - 'es6-table': 'http://kangax.github.io/es5-compat-table/es6/', - google: 'http://www.google.com/', - 'html-minifier': 'https://github.com/kangax/html-minifier', - msn: 'http://www.msn.com/', - nbc: 'http://www.nbc.com/', - newyorktimes: 'http://www.nytimes.com/', - stackoverflow: 'http://stackoverflow.com/', - wikipedia: 'http://en.wikipedia.org/wiki/President_of_the_United_States' -}; +var urls = require('./benchmarks'); var fileNames = Object.keys(urls).sort(); function all(tasks, callback) { diff --git a/benchmark.js b/benchmark.js index 41a01b6..e3d6530 100644 --- a/benchmark.js +++ b/benchmark.js @@ -16,19 +16,7 @@ var brotli = require('brotli'), url = require('url'), zlib = require('zlib'); -var urls = { - amazon: 'http://www.amazon.com/', - eloquentjavascript: 'http://eloquentjavascript.net/print.html', - es6: 'https://people.mozilla.org/~jorendorff/es6-draft.html', - 'es6-table': 'http://kangax.github.io/es5-compat-table/es6/', - google: 'http://www.google.com/', - 'html-minifier': 'https://github.com/kangax/html-minifier', - msn: 'http://www.msn.com/', - nbc: 'http://www.nbc.com/', - newyorktimes: 'http://www.nytimes.com/', - stackoverflow: 'http://stackoverflow.com/', - wikipedia: 'http://en.wikipedia.org/wiki/President_of_the_United_States' -}; +var urls = require('./benchmarks'); var fileNames = Object.keys(urls).sort(); var minimize = new Minimize(); diff --git a/benchmarks/index.json b/benchmarks/index.json new file mode 100644 index 0000000..f5b097f --- /dev/null +++ b/benchmarks/index.json @@ -0,0 +1,13 @@ +{ + "amazon": "http://www.amazon.com/", + "eloquentjavascript": "http://eloquentjavascript.net/print.html", + "es6": "https://people.mozilla.org/~jorendorff/es6-draft.html", + "es6-table": "http://kangax.github.io/es5-compat-table/es6/", + "google": "http://www.google.com/", + "html-minifier": "https://github.com/kangax/html-minifier", + "msn": "http://www.msn.com/", + "nbc": "http://www.nbc.com/", + "newyorktimes": "http://www.nytimes.com/", + "stackoverflow": "http://stackoverflow.com/", + "wikipedia": "http://en.wikipedia.org/wiki/President_of_the_United_States" +} \ No newline at end of file -- 2.34.1