ardatan / whatwg-node

Helper packages to create platform agnostic applications and libraries without worrying about the lack of WHATWG support in Node.js
MIT License
158 stars 31 forks source link

New DisposableStack ponyfill and improvements on other ponyfills #1514

Closed ardatan closed 3 months ago

github-actions[bot] commented 3 months ago

@benchmarks/node-fetch results (consumeBody)

   ✓ active_handles.................: avg=140.610612 min=13     med=142     max=182      p(90)=161     p(95)=165    
     data_received..................: 21 MB  711 kB/s
     data_sent......................: 14 MB  456 kB/s
     http_req_blocked...............: avg=2.64µs     min=651ns  med=1.25µs  max=6.39ms   p(90)=1.99µs  p(95)=2.28µs 
     http_req_connecting............: avg=750ns      min=0s     med=0s      max=5.83ms   p(90)=0s      p(95)=0s     
     http_req_duration..............: avg=21.45ms    min=2.61ms med=20.82ms max=987.39ms p(90)=26.88ms p(95)=28.59ms
       { expected_response:true }...: avg=21.45ms    min=2.61ms med=20.82ms max=987.39ms p(90)=26.88ms p(95)=28.59ms
     http_req_failed................: 0.00%  ✓ 1           ✗ 139367
     http_req_receiving.............: avg=35.64µs    min=8.99µs med=23.77µs max=20.37ms  p(90)=38.29µs p(95)=44.9µs 
     http_req_sending...............: avg=11.28µs    min=3.31µs med=5.94µs  max=15.43ms  p(90)=9.44µs  p(95)=13.38µs
     http_req_tls_handshaking.......: avg=0s         min=0s     med=0s      max=0s       p(90)=0s      p(95)=0s     
     http_req_waiting...............: avg=21.41ms    min=2.56ms med=20.78ms max=987.29ms p(90)=26.84ms p(95)=28.51ms
     http_reqs......................: 139368 4645.168235/s
     iteration_duration.............: avg=43.02ms    min=9.35ms med=41.54ms max=1.01s    p(90)=47.24ms p(95)=53.05ms
     iterations.....................: 69658  2321.717532/s
     vus............................: 100    min=100       max=100 
     vus_max........................: 100    min=100       max=100 
github-actions[bot] commented 3 months ago

@benchmarks/node-fetch results (noConsumeBody)

   ✓ active_handles.................: avg=140.383107 min=103     med=141     max=198      p(90)=161     p(95)=167    
     data_received..................: 22 MB  741 kB/s
     data_sent......................: 14 MB  480 kB/s
     http_req_blocked...............: avg=5.07µs     min=661ns   med=1.37µs  max=15.06ms  p(90)=2.02µs  p(95)=2.32µs 
     http_req_connecting............: avg=3.08µs     min=0s      med=0s      max=9.37ms   p(90)=0s      p(95)=0s     
     http_req_duration..............: avg=20.56ms    min=2.42ms  med=20.05ms max=189.16ms p(90)=26.19ms p(95)=28.81ms
       { expected_response:true }...: avg=20.56ms    min=2.42ms  med=20.05ms max=189.16ms p(90)=26.19ms p(95)=28.81ms
     http_req_failed................: 0.00%  ✓ 0           ✗ 145390
     http_req_receiving.............: avg=33.52µs    min=9.04µs  med=23.25µs max=18.14ms  p(90)=38.74µs p(95)=46.18µs
     http_req_sending...............: avg=11.18µs    min=3.25µs  med=6.41µs  max=19.16ms  p(90)=9.58µs  p(95)=13.67µs
     http_req_tls_handshaking.......: avg=0s         min=0s      med=0s      max=0s       p(90)=0s      p(95)=0s     
     http_req_waiting...............: avg=20.52ms    min=2.37ms  med=20.01ms max=188.38ms p(90)=26.15ms p(95)=28.74ms
     http_reqs......................: 145390 4845.398613/s
     iteration_duration.............: avg=41.24ms    min=12.65ms med=39.8ms  max=236.01ms p(90)=46.85ms p(95)=52.21ms
     iterations.....................: 72669  2421.832807/s
     vus............................: 61     min=61        max=100 
     vus_max........................: 100    min=100       max=100 
github-actions[bot] commented 3 months ago

@benchmarks/server results (native)

     ✓ no-errors
     ✓ expected-result

   ✓ checks.........................: 100.00% ✓ 230802     ✗ 0     
     data_received..................: 23 MB   773 kB/s
     data_sent......................: 9.2 MB  308 kB/s
     http_req_blocked...............: avg=1.4µs    min=901ns    med=1.2µs    max=204.03µs p(90)=1.88µs   p(95)=2.04µs  
     http_req_connecting............: avg=1ns      min=0s       med=0s       max=154.54µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=198.73µs min=140.18µs med=186.99µs max=12.53ms  p(90)=212.72µs p(95)=221.8µs 
       { expected_response:true }...: avg=198.73µs min=140.18µs med=186.99µs max=12.53ms  p(90)=212.72µs p(95)=221.8µs 
     http_req_failed................: 0.00%   ✓ 0          ✗ 115401
     http_req_receiving.............: avg=25.42µs  min=13.61µs  med=23.86µs  max=7.24ms   p(90)=30.92µs  p(95)=33.03µs 
     http_req_sending...............: avg=6.26µs   min=4µs      med=5.5µs    max=1.53ms   p(90)=8.08µs   p(95)=8.54µs  
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=167.04µs min=120.34µs med=155.08µs max=12.48ms  p(90)=177.63µs p(95)=185.93µs
     http_reqs......................: 115401  3846.52436/s
     iteration_duration.............: avg=255.56µs min=191.01µs med=242.85µs max=12.61ms  p(90)=272.43µs p(95)=284.3µs 
     iterations.....................: 115401  3846.52436/s
     vus............................: 1       min=1        max=1   
     vus_max........................: 1       min=1        max=1   
github-actions[bot] commented 3 months ago

@benchmarks/server results (ponyfill)

     ✓ no-errors
     ✓ expected-result

   ✓ checks.........................: 100.00% ✓ 295152      ✗ 0     
     data_received..................: 29 MB   969 kB/s
     data_sent......................: 12 MB   394 kB/s
     http_req_blocked...............: avg=1.42µs   min=882ns   med=1.19µs   max=5.46ms   p(90)=1.88µs   p(95)=2.03µs  
     http_req_connecting............: avg=0ns      min=0s      med=0s       max=122.75µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=141.54µs min=94.42µs med=136.33µs max=7.32ms   p(90)=157.75µs p(95)=164.01µs
       { expected_response:true }...: avg=141.54µs min=94.42µs med=136.33µs max=7.32ms   p(90)=157.75µs p(95)=164.01µs
     http_req_failed................: 0.00%   ✓ 0           ✗ 147576
     http_req_receiving.............: avg=24.4µs   min=12.25µs med=23.28µs  max=1.38ms   p(90)=30.21µs  p(95)=32.2µs  
     http_req_sending...............: avg=6.16µs   min=4.07µs  med=5.41µs   max=275.89µs p(90)=7.96µs   p(95)=8.48µs  
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=110.97µs min=68.03µs med=105.36µs max=7.09ms   p(90)=123.79µs p(95)=128.81µs
     http_reqs......................: 147576  4919.015028/s
     iteration_duration.............: avg=198.82µs min=136.1µs med=192.92µs max=7.41ms   p(90)=217.13µs p(95)=225.36µs
     iterations.....................: 147576  4919.015028/s
     vus............................: 1       min=1         max=1   
     vus_max........................: 1       min=1         max=1   
github-actions[bot] commented 3 months ago

🚀 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/disposablestack 0.0.1-alpha-20240729092851-e6f49271992ce0539877a6efb0c204af6581da65 npm ↗︎ unpkg ↗︎
@whatwg-node/events 0.1.2-alpha-20240729092851-e6f49271992ce0539877a6efb0c204af6581da65 npm ↗︎ unpkg ↗︎
@whatwg-node/node-fetch 0.5.19-alpha-20240729092851-e6f49271992ce0539877a6efb0c204af6581da65 npm ↗︎ unpkg ↗︎