Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! benchmark: support URL inputs in create-clientrequest
  • Loading branch information
joyeecheung committed Nov 11, 2018
commit d6f9f89db7aa0067882ec455963f047eca9b041e
4 changes: 4 additions & 0 deletions benchmark/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ function bakeUrlData(type, e = 0, withBase = false, asUrl = false) {
throw new Error(`Unknown url data type ${type}`);
}

if (typeof e !== 'number') {
throw new Error(`e must be a number, received ${e}`);
}

for (let i = 0; i < e; ++i) {
result = result.concat(result);
}
Expand Down
2 changes: 1 addition & 1 deletion benchmark/url/whatwg-url-properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const common = require('../common.js');
const bench = common.createBenchmark(main, {
withBase: ['true', 'false'],
type: ['wpt'], // Too many combinations - just use WPT by default
power: [1],
e: [1],
prop: ['href', 'origin', 'protocol',
'username', 'password', 'host', 'hostname', 'port',
'pathname', 'search', 'searchParams', 'hash']
Expand Down