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 <hello@about-hiroppy.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
  • Loading branch information
TimothyGu authored and krydos committed Feb 25, 2017
1 parent 18a65a2 commit f5f6b79
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 f5f6b79

Please sign in to comment.