GeezerVison is showing github.com — benchmark: add trailing commas in `benchmark/url` · nodejs/node@a383aee
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: benchmark/.eslintrc.yaml -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,6 @@ overrides: | 12 | 12 | - crypto/*.js | 13 | 13 | - http/*.js | 14 | 14 | - path/*.js | 15 | | - - url/*.js | 16 | 15 | rules: | 17 | 16 | comma-dangle: [error, { | 18 | 17 | arrays: always-multiline, | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/url/legacy-vs-whatwg-url-get-prop.js +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,7 +7,7 @@ const assert = require('assert'); | 7 | 7 | const bench = common.createBenchmark(main, { | 8 | 8 | type: common.urlDataTypes, | 9 | 9 | method: ['legacy', 'whatwg'], | 10 | | - e: [1] | | 10 | + e: [1], | 11 | 11 | }); | 12 | 12 |
| 13 | 13 | function useLegacy(data) { | @@ -20,7 +20,7 @@ function useLegacy(data) { | 20 | 20 | port: obj.port, | 21 | 21 | pathname: obj.pathname, | 22 | 22 | search: obj.search, | 23 | | - hash: obj.hash | | 23 | + hash: obj.hash, | 24 | 24 | }; | 25 | 25 | const len = data.length; | 26 | 26 | // It's necessary to assign the values to an object | @@ -51,7 +51,7 @@ function useWHATWG(data) { | 51 | 51 | port: obj.port, | 52 | 52 | pathname: obj.pathname, | 53 | 53 | search: obj.search, | 54 | | - hash: obj.hash | | 54 | + hash: obj.hash, | 55 | 55 | }; | 56 | 56 | const len = data.length; | 57 | 57 | bench.start(); | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/url/legacy-vs-whatwg-url-parse.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, { | 8 | 8 | withBase: ['true', 'false'], | 9 | 9 | type: common.urlDataTypes, | 10 | 10 | e: [1], | 11 | | - method: ['legacy', 'whatwg'] | | 11 | + method: ['legacy', 'whatwg'], | 12 | 12 | }); | 13 | 13 |
| 14 | 14 | function useLegacy(data) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/url/legacy-vs-whatwg-url-searchparams-parse.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ const searchParams = common.searchParams; | 6 | 6 | const bench = common.createBenchmark(main, { | 7 | 7 | searchParam: Object.keys(searchParams), | 8 | 8 | method: ['legacy', 'whatwg'], | 9 | | - n: [1e6] | | 9 | + n: [1e6], | 10 | 10 | }); | 11 | 11 |
| 12 | 12 | function useLegacy(n, input) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/url/legacy-vs-whatwg-url-searchparams-serialize.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ const searchParams = common.searchParams; | 6 | 6 | const bench = common.createBenchmark(main, { | 7 | 7 | searchParam: Object.keys(searchParams), | 8 | 8 | method: ['legacy', 'whatwg'], | 9 | | - n: [1e6] | | 9 | + n: [1e6], | 10 | 10 | }); | 11 | 11 |
| 12 | 12 | function useLegacy(n, input, prop) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/url/legacy-vs-whatwg-url-serialize.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,7 +7,7 @@ const assert = require('assert'); | 7 | 7 | const bench = common.createBenchmark(main, { | 8 | 8 | type: common.urlDataTypes, | 9 | 9 | method: ['legacy', 'whatwg'], | 10 | | - e: [1] | | 10 | + e: [1], | 11 | 11 | }); | 12 | 12 |
| 13 | 13 | function useLegacy(data) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/url/url-format.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -9,7 +9,7 @@ const inputs = { | 9 | 9 |
| 10 | 10 | const bench = common.createBenchmark(main, { | 11 | 11 | type: Object.keys(inputs), | 12 | | - n: [25e6] | | 12 | + n: [25e6], | 13 | 13 | }); | 14 | 14 |
| 15 | 15 | function main({ type, n }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/url/url-parse.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,12 +4,12 @@ const url = require('url'); | 4 | 4 |
| 5 | 5 | const inputs = { | 6 | 6 | normal: 'http://foo.com/bar', | 7 | | - escaped: 'https://foo.bar/{}^`/abcd' | | 7 | + escaped: 'https://foo.bar/{}^`/abcd', | 8 | 8 | }; | 9 | 9 |
| 10 | 10 | const bench = common.createBenchmark(main, { | 11 | 11 | type: Object.keys(inputs), | 12 | | - n: [1e7] | | 12 | + n: [1e7], | 13 | 13 | }); | 14 | 14 |
| 15 | 15 | function main({ type, n }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/url/url-resolve.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -9,13 +9,13 @@ const paths = { | 9 | 9 | 'sibling': '../foo/bar?baz=boom', | 10 | 10 | 'foo/bar': 'foo/bar', | 11 | 11 | 'withscheme': 'http://nodejs.org', | 12 | | - 'down': './foo/bar?baz' | | 12 | + 'down': './foo/bar?baz', | 13 | 13 | }; | 14 | 14 |
| 15 | 15 | const bench = common.createBenchmark(main, { | 16 | 16 | href: Object.keys(hrefs), | 17 | 17 | path: Object.keys(paths), | 18 | | - n: [1e5] | | 18 | + n: [1e5], | 19 | 19 | }); | 20 | 20 |
| 21 | 21 | function main({ n, href, path }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/url/url-searchparams-iteration.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ const assert = require('assert'); | 4 | 4 |
| 5 | 5 | const bench = common.createBenchmark(main, { | 6 | 6 | loopMethod: ['forEach', 'iterator'], | 7 | | - n: [1e6] | | 7 | + n: [1e6], | 8 | 8 | }); | 9 | 9 |
| 10 | 10 | const str = 'one=single&two=first&three=first&two=2nd&three=2nd&three=3rd'; | |
|