Skip to content

benchmark: unify input to url-related benchmarks - #11264

Closed
joyeecheung wants to merge 3 commits into
nodejs:masterfrom
joyeecheung:unify-url-bench
Closed

benchmark: unify input to url-related benchmarks#11264
joyeecheung wants to merge 3 commits into
nodejs:masterfrom
joyeecheung:unify-url-bench

Conversation

@joyeecheung

@joyeecheungjoyeecheung commented Feb 9, 2017

Copy link
Copy Markdown
Member

This PR moves common input to url-related benchmarks into fixtures and removes duplicate benchmarks

  • url-parse.js is covered by legacy-vs-whatwg-url-parse.js with method="legacy"
  • stringifier benchmark in whatwg-url-properties.js is covered by legacy-vs-whatwg-url-serialize.js with method="legacy" (it is still worth keeping because legacy-vs-whatwg-url-get-prop.js benchmarks getting all properties at once while whatwg-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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

benchmark, url

@nodejs-github-botnodejs-github-bot added the benchmark Issues and PRs related to the benchmark subsystem. label Feb 9, 2017
@joyeecheungjoyeecheung added whatwg-url Issues and PRs related to the WHATWG URL implementation. querystring Issues and PRs related to the built-in querystring module. url Issues and PRs related to the legacy built-in url module. labels Feb 9, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate assignment

Copy link
Copy Markdown
MemberAuthor

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this removed?

Copy link
Copy Markdown
MemberAuthor

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.

@mscdex

Copy link
Copy Markdown
Contributor

There's a typo in the second commit message.

@joyeecheung

Copy link
Copy Markdown
MemberAuthor

@mscdex Thanks for the review, updated, PTAL.

@joyeecheung

Copy link
Copy Markdown
MemberAuthor

@joyeecheung

Copy link
Copy Markdown
MemberAuthor

@mscdex Can I have a LGTM please? Thanks!

@joyeecheung

Copy link
Copy Markdown
MemberAuthor

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'

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
MemberAuthor

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");'

@mscdex

Copy link
Copy Markdown
Contributor

@mscdex

Copy link
Copy Markdown
Contributor

CI is green, LGTM.

jasnell pushed a commit that referenced this pull request Feb 15, 2017
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>
jasnell pushed a commit that referenced this pull request Feb 15, 2017
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>
jasnell pushed a commit that referenced this pull request Feb 15, 2017
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>
@jasnell

Copy link
Copy Markdown
Member

Landed in e571fd4...7ee9504

@jasnelljasnell closed this Feb 15, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Feb 16, 2017
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>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Feb 16, 2017
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>
TimothyGu pushed a commit to TimothyGu/node that referenced this pull request Feb 18, 2017
@TimothyGuTimothyGu mentioned this pull request Feb 18, 2017
4 tasks
@joyeecheung
joyeecheung deleted the unify-url-bench branch February 19, 2017 17:44
italoacasas pushed a commit to italoacasas/node that referenced this pull request Feb 20, 2017
italoacasas pushed a commit that referenced this pull request Feb 22, 2017
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>
italoacasas pushed a commit that referenced this pull request Feb 22, 2017
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>
italoacasas pushed a commit that referenced this pull request Feb 22, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmarkIssues and PRs related to the benchmark subsystem.querystringIssues and PRs related to the built-in querystring module.urlIssues and PRs related to the legacy built-in url module.whatwg-urlIssues and PRs related to the WHATWG URL implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@joyeecheung@mscdex@jasnell@watilde@TimothyGu@italoacasas@nodejs-github-bot