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

https: refactor to use more primordials #36195

Closed
wants to merge 1 commit into from

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Nov 20, 2020

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/http
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added the https Issues or PRs related to the https subsystem. label Nov 20, 2020
@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 20, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 20, 2020
@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member

Trott commented Nov 21, 2020

Do we need to run benchmarks for changes like this?

@aduh95 aduh95 added the needs-benchmark-ci PR that need a benchmark CI run. label Nov 21, 2020
@aduh95
Copy link
Contributor Author

aduh95 commented Dec 15, 2020

Do we need to run benchmarks for changes like this?

It seems there is no benchmark for https, how can we move this forward?

@Trott
Copy link
Member

Trott commented Dec 22, 2020

I guess the options are: Don't worry about it (especially if none of this code is in a hot path?), or try to write a benchmark (maybe based on existing http benchmarks). @nodejs/http @nodejs/benchmarking @mscdex

@puzpuzpuz
Copy link
Member

puzpuzpuz commented Dec 23, 2020

@Trott #36612 should add a basic benchmark for https server. Once it lands, the benchmark may be run with these changes (yet, I don't think we'll see any noticeable regression).

@aduh95
Copy link
Contributor Author

aduh95 commented Dec 25, 2020

Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/801/

@aduh95
Copy link
Contributor Author

aduh95 commented Dec 25, 2020

yet, I don't think we'll see any noticeable regression

That's confirmed by the above benchmark.

                                                                                                                 confidence improvement accuracy (*)    (**)   (***)
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=500 chunks=1 len=102400 type='buffer'                 1.23 %       ±7.07%  ±9.42% ±12.29%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=500 chunks=1 len=102400 type='bytes'                 -1.40 %       ±6.03%  ±8.05% ±10.54%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=500 chunks=1 len=1024 type='buffer'                   1.43 %      ±10.26% ±13.66% ±17.77%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=500 chunks=1 len=1024 type='bytes'                    1.61 %       ±6.23%  ±8.34% ±10.97%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=500 chunks=1 len=4 type='buffer'                     -0.40 %       ±2.12%  ±2.82%  ±3.67%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=500 chunks=1 len=4 type='bytes'                      -2.39 %       ±4.12%  ±5.49%  ±7.17%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=500 chunks=4 len=102400 type='buffer'                -3.15 %       ±4.42%  ±5.93%  ±7.83%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=500 chunks=4 len=102400 type='bytes'                  1.39 %       ±5.33%  ±7.14%  ±9.38%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=500 chunks=4 len=1024 type='buffer'                  -1.68 %       ±2.55%  ±3.42%  ±4.49%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=500 chunks=4 len=1024 type='bytes'                    0.87 %       ±3.60%  ±4.79%  ±6.23%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=500 chunks=4 len=4 type='buffer'                     -1.14 %       ±3.46%  ±4.62%  ±6.04%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=500 chunks=4 len=4 type='bytes'                      -1.20 %       ±5.95%  ±7.93% ±10.35%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=50 chunks=1 len=102400 type='buffer'                 -2.64 %       ±4.37%  ±5.86%  ±7.72%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=50 chunks=1 len=102400 type='bytes'                  -1.12 %       ±4.15%  ±5.53%  ±7.20%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=50 chunks=1 len=1024 type='buffer'                    2.11 %       ±3.87%  ±5.19%  ±6.83%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=50 chunks=1 len=1024 type='bytes'                     2.71 %       ±7.72% ±10.27% ±13.37%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=50 chunks=1 len=4 type='buffer'                      -4.66 %       ±6.49%  ±8.73% ±11.54%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=50 chunks=1 len=4 type='bytes'                       -2.51 %       ±2.96%  ±3.96%  ±5.19%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=50 chunks=4 len=102400 type='buffer'                 -2.76 %       ±4.20%  ±5.62%  ±7.39%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=50 chunks=4 len=102400 type='bytes'                  -1.53 %       ±4.61%  ±6.17%  ±8.10%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=50 chunks=4 len=1024 type='buffer'                    5.12 %       ±8.60% ±11.57% ±15.31%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=50 chunks=4 len=1024 type='bytes'                     3.55 %       ±5.55%  ±7.42%  ±9.72%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=50 chunks=4 len=4 type='buffer'                       0.16 %       ±8.99% ±11.96% ±15.57%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=0 c=50 chunks=4 len=4 type='bytes'                 *     -2.74 %       ±2.46%  ±3.28%  ±4.29%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=500 chunks=1 len=102400 type='buffer'                 1.97 %       ±3.50%  ±4.67%  ±6.10%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=500 chunks=1 len=102400 type='bytes'                  0.76 %       ±3.49%  ±4.65%  ±6.06%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=500 chunks=1 len=1024 type='buffer'                  -1.09 %       ±3.39%  ±4.51%  ±5.89%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=500 chunks=1 len=1024 type='bytes'                    0.33 %       ±1.71%  ±2.28%  ±2.96%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=500 chunks=1 len=4 type='buffer'                     -0.47 %       ±3.82%  ±5.09%  ±6.62%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=500 chunks=1 len=4 type='bytes'                       0.34 %       ±3.35%  ±4.46%  ±5.83%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=500 chunks=4 len=102400 type='buffer'                -2.87 %       ±3.93%  ±5.24%  ±6.84%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=500 chunks=4 len=102400 type='bytes'                  3.62 %       ±5.05%  ±6.76%  ±8.88%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=500 chunks=4 len=1024 type='buffer'                  -0.72 %       ±2.49%  ±3.31%  ±4.31%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=500 chunks=4 len=1024 type='bytes'                    6.28 %       ±7.12%  ±9.58% ±12.69%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=500 chunks=4 len=4 type='buffer'                     -0.23 %       ±4.44%  ±5.95%  ±7.81%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=500 chunks=4 len=4 type='bytes'                      -0.69 %       ±3.30%  ±4.39%  ±5.73%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=50 chunks=1 len=102400 type='buffer'                 -2.78 %       ±7.99% ±10.66% ±13.93%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=50 chunks=1 len=102400 type='bytes'           **      4.19 %       ±2.77%  ±3.70%  ±4.85%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=50 chunks=1 len=1024 type='buffer'                    3.94 %       ±7.65% ±10.28% ±13.58%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=50 chunks=1 len=1024 type='bytes'                    -2.53 %       ±4.70%  ±6.32%  ±8.34%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=50 chunks=1 len=4 type='buffer'                *      3.31 %       ±3.05%  ±4.06%  ±5.29%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=50 chunks=1 len=4 type='bytes'                       -2.39 %       ±8.13% ±10.82% ±14.09%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=50 chunks=4 len=102400 type='buffer'                  0.58 %       ±6.42%  ±8.54% ±11.11%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=50 chunks=4 len=102400 type='bytes'                  -1.10 %       ±4.07%  ±5.42%  ±7.06%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=50 chunks=4 len=1024 type='buffer'                   -2.44 %       ±3.34%  ±4.45%  ±5.80%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=50 chunks=4 len=1024 type='bytes'                    -1.03 %       ±2.99%  ±3.99%  ±5.19%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=50 chunks=4 len=4 type='buffer'                       0.86 %       ±2.93%  ±3.91%  ±5.09%
 https/simple.js duration=5 benchmarker='test-double-https' chunkedEnc=1 c=50 chunks=4 len=4 type='bytes'                       -1.04 %       ±4.91%  ±6.59%  ±8.70%

Be aware that when doing many comparisons the risk of a false-positive
result increases. In this case there are 48 comparisons, you can thus
expect the following amount of false-positive results:
  2.40 false positives, when considering a   5% risk acceptance (*, **, ***),
  0.48 false positives, when considering a   1% risk acceptance (**, ***),
  0.05 false positives, when considering a 0.1% risk acceptance (***)

@aduh95 aduh95 added review wanted PRs that need reviews. and removed needs-benchmark-ci PR that need a benchmark CI run. labels Dec 25, 2020
@puzpuzpuz puzpuzpuz self-requested a review December 26, 2020 10:43
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. and removed review wanted PRs that need reviews. labels Dec 26, 2020
@puzpuzpuz puzpuzpuz added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 26, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 26, 2020
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Dec 26, 2020

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 27, 2020
@github-actions github-actions bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 27, 2020
@github-actions
Copy link
Contributor

Landed in 6c50d74...aabbf30

@github-actions github-actions bot closed this Dec 27, 2020
nodejs-github-bot pushed a commit that referenced this pull request Dec 27, 2020
PR-URL: #36195
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
@aduh95 aduh95 deleted the https-primordials branch December 27, 2020 23:12
danielleadams pushed a commit that referenced this pull request Jan 12, 2021
PR-URL: #36195
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
@danielleadams danielleadams mentioned this pull request Jan 12, 2021
targos pushed a commit that referenced this pull request May 25, 2021
PR-URL: #36195
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
targos pushed a commit that referenced this pull request Jun 5, 2021
PR-URL: #36195
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
targos pushed a commit that referenced this pull request Jun 11, 2021
PR-URL: #36195
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. https Issues or PRs related to the https subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants