Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/url/url-format.js')
-rw-r--r--benchmark/url/url-format.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/benchmark/url/url-format.js b/benchmark/url/url-format.js
index 3f7df8a0bc4..886958406b9 100644
--- a/benchmark/url/url-format.js
+++ b/benchmark/url/url-format.js
@@ -3,8 +3,13 @@ const common = require('../common.js');
const url = require('url');
const v8 = require('v8');
+const inputs = {
+ slashes: {slashes: true, host: 'localhost'},
+ file: {protocol: 'file:', pathname: '/foo'},
+};
+
const bench = common.createBenchmark(main, {
- type: 'one two'.split(' '),
+ type: Object.keys(inputs),
n: [25e6]
});
@@ -12,10 +17,6 @@ function main(conf) {
const type = conf.type;
const n = conf.n | 0;
- const inputs = {
- one: {slashes: true, host: 'localhost'},
- two: {protocol: 'file:', pathname: '/foo'},
- };
const input = inputs[type] || '';
// Force-optimize url.format() so that the benchmark doesn't get