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

Avoid polluting the original object in case of Object.create #1799

Merged
merged 4 commits into from
Nov 14, 2024

Conversation

ardatan
Copy link
Owner

@ardatan ardatan commented Nov 13, 2024

See #1796

Copy link
Contributor

github-actions bot commented Nov 13, 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/server 0.9.55-alpha-20241114091544-6efa470559d32165dae4d9276a4b6e4e70279e19 npm ↗︎ unpkg ↗︎

Copy link
Contributor

github-actions bot commented Nov 13, 2024

@benchmarks/node-fetch results (noConsumeBody)

   ✓ active_handles.................: avg=139.436149 min=52      med=138     max=200      p(90)=163     p(95)=169    
     data_received..................: 22 MB  722 kB/s
     data_sent......................: 14 MB  468 kB/s
     http_req_blocked...............: avg=3.01µs     min=641ns   med=1.44µs  max=6.63ms   p(90)=2.15µs  p(95)=2.58µs 
     http_req_connecting............: avg=1.05µs     min=0s      med=0s      max=4.3ms    p(90)=0s      p(95)=0s     
     http_req_duration..............: avg=21.11ms    min=7.63ms  med=20.5ms  max=991.35ms p(90)=26.84ms p(95)=29.02ms
       { expected_response:true }...: avg=21.11ms    min=7.63ms  med=20.5ms  max=991.35ms p(90)=26.84ms p(95)=29.02ms
     http_req_failed................: 0.00%  ✓ 0           ✗ 141618
     http_req_receiving.............: avg=37.31µs    min=10.08µs med=25.92µs max=26.28ms  p(90)=41.53µs p(95)=50.69µs
     http_req_sending...............: avg=12.2µs     min=3.61µs  med=7.19µs  max=18.08ms  p(90)=10.64µs p(95)=14.83µs
     http_req_tls_handshaking.......: avg=0s         min=0s      med=0s      max=0s       p(90)=0s      p(95)=0s     
     http_req_waiting...............: avg=21.06ms    min=7.6ms   med=20.45ms max=991.26ms p(90)=26.79ms p(95)=28.91ms
     http_reqs......................: 141618 4720.134502/s
     iteration_duration.............: avg=42.34ms    min=20.8ms  med=40.71ms max=1.01s    p(90)=48.08ms p(95)=52.79ms
     iterations.....................: 70790  2359.43398/s
     vus............................: 100    min=100       max=100 
     vus_max........................: 100    min=100       max=100 

Copy link
Contributor

github-actions bot commented Nov 13, 2024

@benchmarks/server results (undici)

     ✓ no-errors
     ✓ expected-result

   ✓ checks.........................: 100.00% ✓ 217824      ✗ 0     
     data_received..................: 22 MB   730 kB/s
     data_sent......................: 8.7 MB  290 kB/s
     http_req_blocked...............: avg=1.41µs   min=912ns    med=1.21µs   max=213.62µs p(90)=1.9µs    p(95)=2.06µs  
     http_req_connecting............: avg=1ns      min=0s       med=0s       max=136.76µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=213.08µs min=162.42µs med=198.09µs max=46.07ms  p(90)=225.73µs p(95)=241.3µs 
       { expected_response:true }...: avg=213.08µs min=162.42µs med=198.09µs max=46.07ms  p(90)=225.73µs p(95)=241.3µs 
     http_req_failed................: 0.00%   ✓ 0           ✗ 108912
     http_req_receiving.............: avg=25.71µs  min=14.42µs  med=24.31µs  max=2.88ms   p(90)=31.51µs  p(95)=33.66µs 
     http_req_sending...............: avg=6.38µs   min=4.12µs   med=5.7µs    max=1ms      p(90)=8.16µs   p(95)=8.76µs  
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=180.99µs min=130.2µs  med=165.78µs max=45.99ms  p(90)=189.73µs p(95)=203.81µs
     http_reqs......................: 108912  3630.245251/s
     iteration_duration.............: avg=270.97µs min=211.84µs med=255.17µs max=46.23ms  p(90)=286.77µs p(95)=308.17µs
     iterations.....................: 108912  3630.245251/s
     vus............................: 1       min=1         max=1   
     vus_max........................: 1       min=1         max=1   

Copy link
Contributor

github-actions bot commented Nov 13, 2024

@benchmarks/server results (native)

     ✓ no-errors
     ✓ expected-result

   ✓ checks.........................: 100.00% ✓ 237148      ✗ 0     
     data_received..................: 24 MB   794 kB/s
     data_sent......................: 9.5 MB  316 kB/s
     http_req_blocked...............: avg=1.42µs   min=941ns    med=1.23µs   max=178.01µs p(90)=1.91µs   p(95)=2.07µs  
     http_req_connecting............: avg=1ns      min=0s       med=0s       max=120.15µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=192.02µs min=143.76µs med=179.14µs max=29.7ms   p(90)=204.65µs p(95)=217.32µs
       { expected_response:true }...: avg=192.02µs min=143.76µs med=179.14µs max=29.7ms   p(90)=204.65µs p(95)=217.32µs
     http_req_failed................: 0.00%   ✓ 0           ✗ 118574
     http_req_receiving.............: avg=25.07µs  min=13.58µs  med=23.74µs  max=2.71ms   p(90)=30.76µs  p(95)=32.79µs 
     http_req_sending...............: avg=6.25µs   min=4.11µs   med=5.49µs   max=396.06µs 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=160.69µs min=114.87µs med=147.27µs max=29.62ms  p(90)=169.8µs  p(95)=181.52µs
     http_reqs......................: 118574  3952.329367/s
     iteration_duration.............: avg=248.72µs min=191.45µs med=234.85µs max=29.85ms  p(90)=264.09µs p(95)=280.64µs
     iterations.....................: 118574  3952.329367/s
     vus............................: 1       min=1         max=1   
     vus_max........................: 1       min=1         max=1   

Copy link
Contributor

github-actions bot commented Nov 13, 2024

@benchmarks/server results (ponyfill)

     ✓ no-errors
     ✓ expected-result

   ✓ checks.........................: 100.00% ✓ 297464      ✗ 0     
     data_received..................: 29 MB   977 kB/s
     data_sent......................: 12 MB   397 kB/s
     http_req_blocked...............: avg=1.39µs   min=922ns   med=1.2µs    max=254.13µs p(90)=1.85µs   p(95)=2.02µs  
     http_req_connecting............: avg=0ns      min=0s      med=0s       max=120.75µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=140.09µs min=92.73µs med=134.35µs max=7.32ms   p(90)=156.94µs p(95)=164.76µs
       { expected_response:true }...: avg=140.09µs min=92.73µs med=134.35µs max=7.32ms   p(90)=156.94µs p(95)=164.76µs
     http_req_failed................: 0.00%   ✓ 0           ✗ 148732
     http_req_receiving.............: avg=24.46µs  min=12.31µs med=23.27µs  max=2.43ms   p(90)=30.28µs  p(95)=32.45µs 
     http_req_sending...............: avg=6.23µs   min=4.04µs  med=5.47µs   max=681.39µs p(90)=8.1µs    p(95)=8.59µs  
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=109.39µs min=66.46µs med=103.17µs max=7.28ms   p(90)=122.74µs p(95)=129.58µs
     http_reqs......................: 148732  4957.554139/s
     iteration_duration.............: avg=197.24µs min=140µs   med=190.46µs max=11.11ms  p(90)=216.2µs  p(95)=227.05µs
     iterations.....................: 148732  4957.554139/s
     vus............................: 1       min=1         max=1   
     vus_max........................: 1       min=1         max=1   

Copy link
Contributor

github-actions bot commented Nov 13, 2024

@benchmarks/node-fetch results (consumeBody)

   ✓ active_handles.................: avg=139.517505 min=13      med=138     max=198     p(90)=162     p(95)=167    
     data_received..................: 22 MB  744 kB/s
     data_sent......................: 14 MB  477 kB/s
     http_req_blocked...............: avg=3.07µs     min=662ns   med=1.29µs  max=6.94ms  p(90)=2µs     p(95)=2.26µs 
     http_req_connecting............: avg=1.27µs     min=0s      med=0s      max=6.1ms   p(90)=0s      p(95)=0s     
     http_req_duration..............: avg=20.48ms    min=2.79ms  med=19.75ms max=1.1s    p(90)=25.66ms p(95)=27.82ms
       { expected_response:true }...: avg=20.48ms    min=2.79ms  med=19.75ms max=1.1s    p(90)=25.66ms p(95)=27.82ms
     http_req_failed................: 0.00%  ✓ 0           ✗ 145993
     http_req_receiving.............: avg=32.2µs     min=9.35µs  med=22.49µs max=22.12ms p(90)=36.9µs  p(95)=43.77µs
     http_req_sending...............: avg=10.37µs    min=3.34µs  med=5.89µs  max=17.7ms  p(90)=9.21µs  p(95)=12.74µs
     http_req_tls_handshaking.......: avg=0s         min=0s      med=0s      max=0s      p(90)=0s      p(95)=0s     
     http_req_waiting...............: avg=20.44ms    min=2.75ms  med=19.72ms max=1.1s    p(90)=25.62ms p(95)=27.74ms
     http_reqs......................: 145993 4865.18131/s
     iteration_duration.............: avg=41.07ms    min=10.27ms med=39.47ms max=1.12s   p(90)=46.01ms p(95)=51.02ms
     iterations.....................: 72979  2432.007472/s
     vus............................: 100    min=100       max=100 
     vus_max........................: 100    min=100       max=100 

@ardatan ardatan requested a review from n1ru4l November 13, 2024 15:41
Copy link
Collaborator

@n1ru4l n1ru4l left a comment

Choose a reason for hiding this comment

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

Maybe worth to add test cases for deleteProperty and missing uncovered Proxy functions, aside from that good to go

@ardatan ardatan merged commit 7d1f0ff into master Nov 14, 2024
25 checks passed
@n1ru4l n1ru4l deleted the avoid-pollute branch November 14, 2024 09:45
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.

2 participants