-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
benchmark: unify input to url-related benchmarks #11264
Conversation
'foo=ghi&foo=jkl&foo=mno&foo=pqr&foo=stu&foo=vwxyz', | ||
manypairs: 'a&b&c&d&e&f&g&h&i&j&k&l&m&n&o&p&q&r&s&t&u&v&w&x&y&z' | ||
}; | ||
var inputs = inputs = require('../fixtures/url-inputs.js').searchParams; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate assignment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooop, thanks for catching that.
case 'origin': | ||
case 'searchParams': | ||
get(n, url, prop); | ||
break; | ||
case 'toString': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is covered in legacy-vs-whatwg-url-serialize.js
with method="whatwg"
, also href
is an alias of toString
so we can just look at the results of href
.
There's a typo in the second commit message. |
7a15a68
to
95157e9
Compare
@mscdex Thanks for the review, updated, PTAL. |
@mscdex Can I have a LGTM please? Thanks! |
95157e9
to
b486814
Compare
Rebased |
ws: 'ws://localhost:9229/f46db715-70df-43ad-a359-7f9949f39868', | ||
javascript: 'javascript:alert("node is awesome");', | ||
percent: 'https://%E4%BD%A0/foo', | ||
dot: 'https://example.org/./a/../b/./c' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add mailto:domain@example.com
into here as an example case of mailto
protocol?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should probably just hit the same code paths as 'javascript:alert("node is awesome");'
CI is green, LGTM. |
PR-URL: #11264 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
PR-URL: #11264 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
PR-URL: #11264 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
Landed in e571fd4...7ee9504 |
PR-URL: nodejs#11264 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
PR-URL: nodejs#11264 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
Backport-of: nodejs#11264
Backport-of: nodejs#11264
PR-URL: #11264 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
PR-URL: #11264 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
This PR moves common input to url-related benchmarks into
fixtures
and removes duplicate benchmarksurl-parse.js
is covered bylegacy-vs-whatwg-url-parse.js
withmethod="legacy"
whatwg-url-properties.js
is covered bylegacy-vs-whatwg-url-serialize.js
withmethod="legacy"
(it is still worth keeping becauselegacy-vs-whatwg-url-get-prop.js
benchmarks getting all properties at once whilewhatwg-url-properties.js
benchmarks getting/setting individual property)Some of the search params cases are taken from #11234 per suggestion from #11170 (review)
cc @nodejs/url
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
benchmark, url