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

Test to check if fetchNodeHttp leaks #1162

Merged
merged 10 commits into from
Mar 1, 2024
Merged

Test to check if fetchNodeHttp leaks #1162

merged 10 commits into from
Mar 1, 2024

Conversation

ardatan
Copy link
Owner

@ardatan ardatan commented Feb 28, 2024

No description provided.

Copy link

codesandbox bot commented Feb 28, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link
Contributor

github-actions bot commented Feb 28, 2024

✅ Benchmark Results

     ✓ no-errors
     ✓ expected-result

     checks.........................: 100.00% ✓ 296988      ✗ 0     
     data_received..................: 29 MB   975 kB/s
     data_sent......................: 12 MB   396 kB/s
     http_req_blocked...............: avg=1.38µs   min=872ns    med=1.18µs   max=288.4µs  p(90)=1.87µs   p(95)=2.05µs  
     http_req_connecting............: avg=0ns      min=0s       med=0s       max=123.79µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=140.24µs min=94.86µs  med=133.99µs max=7.49ms   p(90)=156.22µs p(95)=163.68µs
       { expected_response:true }...: avg=140.24µs min=94.86µs  med=133.99µs max=7.49ms   p(90)=156.22µs p(95)=163.68µs
     http_req_failed................: 0.00%   ✓ 0           ✗ 148494
     http_req_receiving.............: avg=24.66µs  min=12.24µs  med=23.44µs  max=353.12µs p(90)=30.79µs  p(95)=32.9µs  
     http_req_sending...............: avg=6.24µs   min=3.89µs   med=5.48µs   max=999.05µs p(90)=8.1µs    p(95)=8.79µs  
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=109.34µs min=69.72µs  med=102.62µs max=7.39ms   p(90)=121.58µs p(95)=127.53µs
     http_reqs......................: 148494  4949.590603/s
     iteration_duration.............: avg=197.68µs min=137.71µs med=190.45µs max=9.13ms   p(90)=216.04µs p(95)=226.33µs
     iterations.....................: 148494  4949.590603/s
     vus............................: 1       min=1         max=1   
     vus_max........................: 1       min=1         max=1   

Copy link
Contributor

github-actions bot commented Feb 29, 2024

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@whatwg-node/fetch 0.9.17-alpha-20240301193514-5a0def1618705c214deaaebc9b385f04b9894f64 npm ↗︎ unpkg ↗︎
@whatwg-node/node-fetch 0.5.7-alpha-20240301193514-5a0def1618705c214deaaebc9b385f04b9894f64 npm ↗︎ unpkg ↗︎
@whatwg-node/server 0.9.26-alpha-20240301193514-5a0def1618705c214deaaebc9b385f04b9894f64 npm ↗︎ unpkg ↗︎

Copy link
Contributor

github-actions bot commented Mar 1, 2024

@benchmarks/node-fetch results (noConsumeBody)

   ✓ active_handles.................: avg=139.792056 min=51     med=140     max=201      p(90)=159     p(95)=164    
     data_received..................: 24 MB  797 kB/s
     data_sent......................: 16 MB  516 kB/s
     http_req_blocked...............: avg=2.55µs     min=681ns  med=1.46µs  max=5.35ms   p(90)=2.05µs  p(95)=2.27µs 
     http_req_connecting............: avg=769ns      min=0s     med=0s      max=5.28ms   p(90)=0s      p(95)=0s     
     http_req_duration..............: avg=19.13ms    min=2.39ms med=18.79ms max=865.07ms p(90)=24.69ms p(95)=26.17ms
       { expected_response:true }...: avg=19.13ms    min=2.39ms med=18.79ms max=865.07ms p(90)=24.69ms p(95)=26.17ms
     http_req_failed................: 0.00%  ✓ 0           ✗ 156229
     http_req_receiving.............: avg=36.34µs    min=8.89µs med=26.17µs max=20.47ms  p(90)=41.14µs p(95)=49.4µs 
     http_req_sending...............: avg=10.82µs    min=2.89µs med=6.62µs  max=20.85ms  p(90)=9.42µs  p(95)=14.19µs
     http_req_tls_handshaking.......: avg=0s         min=0s     med=0s      max=0s       p(90)=0s      p(95)=0s     
     http_req_waiting...............: avg=19.09ms    min=2.36ms med=18.75ms max=864.99ms p(90)=24.64ms p(95)=26.1ms 
     http_reqs......................: 156229 5207.338514/s
     iteration_duration.............: avg=38.37ms    min=7.98ms med=37.39ms max=893.05ms p(90)=41.45ms p(95)=46.11ms
     iterations.....................: 78098  2603.119288/s
     vus............................: 100    min=100       max=100 
     vus_max........................: 100    min=100       max=100 

Copy link
Contributor

github-actions bot commented Mar 1, 2024

@benchmarks/node-fetch results (consumeBody)

   ✓ active_handles.................: avg=140.51966 min=14      med=142     max=187      p(90)=156     p(95)=163    
     data_received..................: 23 MB  753 kB/s
     data_sent......................: 15 MB  483 kB/s
     http_req_blocked...............: avg=2.4µs     min=681ns   med=1.39µs  max=9.45ms   p(90)=2.02µs  p(95)=2.23µs 
     http_req_connecting............: avg=669ns     min=0s      med=0s      max=9.34ms   p(90)=0s      p(95)=0s     
     http_req_duration..............: avg=20.25ms   min=3.35ms  med=19.97ms max=896.1ms  p(90)=25.78ms p(95)=27.1ms 
       { expected_response:true }...: avg=20.25ms   min=3.35ms  med=19.97ms max=896.1ms  p(90)=25.78ms p(95)=27.1ms 
     http_req_failed................: 0.00%  ✓ 0           ✗ 147655
     http_req_receiving.............: avg=34.29µs   min=10.2µs  med=25.99µs max=19.74ms  p(90)=40.64µs p(95)=48.64µs
     http_req_sending...............: avg=11.76µs   min=3.26µs  med=6.39µs  max=24.08ms  p(90)=9.18µs  p(95)=13.41µs
     http_req_tls_handshaking.......: avg=0s        min=0s      med=0s      max=0s       p(90)=0s      p(95)=0s     
     http_req_waiting...............: avg=20.2ms    min=3.32ms  med=19.93ms max=895.91ms p(90)=25.73ms p(95)=27.04ms
     http_reqs......................: 147655 4921.135579/s
     iteration_duration.............: avg=40.6ms    min=10.61ms med=39.53ms max=924.51ms p(90)=44.23ms p(95)=48.34ms
     iterations.....................: 73804  2459.784567/s
     vus............................: 100    min=100       max=100 
     vus_max........................: 100    min=100       max=100 

Copy link
Contributor

github-actions bot commented Mar 1, 2024

@benchmarks/server results

     ✓ no-errors
     ✓ expected-result

   ✓ checks.........................: 100.00% ✓ 305268     ✗ 0     
     data_received..................: 30 MB   1.0 MB/s
     data_sent......................: 12 MB   407 kB/s
     http_req_blocked...............: avg=1.33µs   min=781ns    med=1.14µs   max=174.51µs p(90)=1.82µs   p(95)=1.97µs  
     http_req_connecting............: avg=0ns      min=0s       med=0s       max=120.2µs  p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=135.97µs min=89.99µs  med=131.52µs max=12.27ms  p(90)=153.94µs p(95)=161.95µs
       { expected_response:true }...: avg=135.97µs min=89.99µs  med=131.52µs max=12.27ms  p(90)=153.94µs p(95)=161.95µs
     http_req_failed................: 0.00%   ✓ 0          ✗ 152634
     http_req_receiving.............: avg=24.86µs  min=12.59µs  med=23.64µs  max=450.04µs p(90)=30.84µs  p(95)=32.81µs 
     http_req_sending...............: avg=5.7µs    min=3.77µs   med=4.92µs   max=5ms      p(90)=7.36µs   p(95)=7.75µs  
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=105.4µs  min=68.9µs   med=100.44µs max=12.1ms   p(90)=119.81µs p(95)=126.3µs 
     http_reqs......................: 152634  5087.78439/s
     iteration_duration.............: avg=190.87µs min=134.44µs med=185.08µs max=12.83ms  p(90)=211.26µs p(95)=221.88µs
     iterations.....................: 152634  5087.78439/s
     vus............................: 1       min=1        max=1   
     vus_max........................: 1       min=1        max=1   

@ardatan ardatan merged commit 0c6e9ca into master Mar 1, 2024
21 checks passed
@ardatan ardatan deleted the node-http-leak branch March 1, 2024 19:54
This was referenced Mar 1, 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.

1 participant