Skip to content

Commit

Permalink
benchmark: simplify URLSearchParams import
Browse files Browse the repository at this point in the history
PR-URL: nodejs#11111
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
  • Loading branch information
TimothyGu authored and italoacasas committed Feb 4, 2017
1 parent 1d87384 commit cf55e12
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion benchmark/url/url-searchparams-iteration.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
const common = require('../common.js');
const assert = require('assert');
const URLSearchParams = new (require('url').URL)('a:').searchParams.constructor;
const { URLSearchParams } = require('url');

const bench = common.createBenchmark(main, {
method: ['forEach', 'iterator'],
Expand Down
2 changes: 1 addition & 1 deletion benchmark/url/url-searchparams-parse.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
const common = require('../common.js');
const URLSearchParams = new (require('url').URL)('a:').searchParams.constructor;
const { URLSearchParams } = require('url');

const inputs = {
noencode: 'foo=bar&baz=quux&xyzzy=thud',
Expand Down
2 changes: 1 addition & 1 deletion benchmark/url/url-searchparams-read.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
const common = require('../common.js');
const URLSearchParams = new (require('url').URL)('a:').searchParams.constructor;
const { URLSearchParams } = require('url');

const bench = common.createBenchmark(main, {
method: ['get', 'getAll', 'has'],
Expand Down
2 changes: 1 addition & 1 deletion benchmark/url/url-searchparams-stringifier.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
const common = require('../common.js');
const Buffer = require('buffer').Buffer;
const URLSearchParams = new (require('url').URL)('a:').searchParams.constructor;
const { URLSearchParams } = require('url');

const inputs = {
noencode: 'foo=bar&baz=quux&xyzzy=thud',
Expand Down

0 comments on commit cf55e12

Please sign in to comment.