Skip to content
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

perf: add query parameter to benchmark #1676

Merged
merged 1 commit into from
Oct 3, 2022

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Oct 2, 2022

Referencing #1673, this pull request adds query as a parameter to benchmarks.

@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2022

Codecov Report

Base: 94.74% // Head: 95.47% // Increases project coverage by +0.72% 🎉

Coverage data is based on head (e994ebf) compared to base (7c93a8d).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1676      +/-   ##
==========================================
+ Coverage   94.74%   95.47%   +0.72%     
==========================================
  Files          53       39      -14     
  Lines        4892     2828    -2064     
==========================================
- Hits         4635     2700    -1935     
+ Misses        257      128     -129     
Impacted Files Coverage Δ
index.js 80.00% <0.00%> (-20.00%) ⬇️
lib/core/util.js 89.24% <0.00%> (-8.87%) ⬇️
lib/api/readable.js 82.75% <0.00%> (-8.63%) ⬇️
lib/handler/RedirectHandler.js 87.34% <0.00%> (-7.60%) ⬇️
lib/proxy-agent.js 87.67% <0.00%> (-5.48%) ⬇️
lib/mock/mock-utils.js 95.13% <0.00%> (-4.87%) ⬇️
lib/core/request.js 95.65% <0.00%> (-4.35%) ⬇️
lib/core/connect.js 98.27% <0.00%> (-1.73%) ⬇️
lib/fetch/global.js
lib/fetch/formdata.js
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ronag
Copy link
Member

ronag commented Oct 2, 2022

Not sure this is very indicative for the most common use cases...

@anonrig
Copy link
Member Author

anonrig commented Oct 2, 2022

Thank you for the comment @ronag. This is the worst-case scenario, since URL and node:querystring supports all parameters in this object, but I'm happy to adjust it if you have any suggestions.

@anonrig
Copy link
Member Author

anonrig commented Oct 2, 2022

Here are the benchmark inputs from the Node repository: https://github.com/nodejs/node/blob/main/benchmark/querystring/querystring-stringify.js#L11

@ronag
Copy link
Member

ronag commented Oct 2, 2022

I think we should optimize for most common case rather than worst case. I'm not sure what that is but I'm pretty sure e.g. BigInt is quite unusual...

@anonrig
Copy link
Member Author

anonrig commented Oct 2, 2022

I think we should optimize for most common case rather than worst case. I'm not sure what that is but I'm pretty sure e.g. BigInt is quite unusual...

That seems reasonable. I'll remove it, and update the pull-request.

@anonrig anonrig force-pushed the perf/query-benchmark branch from 1b3340d to e994ebf Compare October 2, 2022 16:28
@ronag ronag merged commit 39a21cf into nodejs:main Oct 3, 2022
@anonrig anonrig deleted the perf/query-benchmark branch October 3, 2022 07:43
metcoder95 pushed a commit to metcoder95/undici that referenced this pull request Dec 26, 2022
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants