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

docs: add TSDoc to plugin's hooks #1880

Merged
merged 4 commits into from
Dec 12, 2024
Merged

docs: add TSDoc to plugin's hooks #1880

merged 4 commits into from
Dec 12, 2024

Conversation

EmrysMyrddin
Copy link
Collaborator

No description provided.

Copy link
Contributor

github-actions bot commented Dec 12, 2024

@benchmarks/node-fetch results (consumeBody)

   ✓ active_handles.................: avg=139.062475 min=70      med=139     max=200      p(90)=161     p(95)=168    
     data_received..................: 22 MB  730 kB/s
     data_sent......................: 14 MB  468 kB/s
     http_req_blocked...............: avg=3.63µs     min=651ns   med=1.35µs  max=7.31ms   p(90)=2.05µs  p(95)=2.37µs 
     http_req_connecting............: avg=1.56µs     min=0s      med=0s      max=5.6ms    p(90)=0s      p(95)=0s     
     http_req_duration..............: avg=20.88ms    min=2.89ms  med=20.17ms max=533.16ms p(90)=26.43ms p(95)=30.06ms
       { expected_response:true }...: avg=20.88ms    min=2.89ms  med=20.17ms max=533.16ms p(90)=26.43ms p(95)=30.06ms
     http_req_failed................: 0.00%  ✓ 0           ✗ 143171
     http_req_receiving.............: avg=35.39µs    min=9.29µs  med=23.8µs  max=28.7ms   p(90)=38.82µs p(95)=45.73µs
     http_req_sending...............: avg=11.35µs    min=3.27µs  med=6.36µs  max=21.04ms  p(90)=9.96µs  p(95)=13.82µs
     http_req_tls_handshaking.......: avg=0s         min=0s      med=0s      max=0s       p(90)=0s      p(95)=0s     
     http_req_waiting...............: avg=20.83ms    min=2.86ms  med=20.13ms max=533.12ms p(90)=26.37ms p(95)=29.96ms
     http_reqs......................: 143171 4771.635142/s
     iteration_duration.............: avg=41.87ms    min=13.14ms med=40.1ms  max=564.45ms p(90)=48.48ms p(95)=53.61ms
     iterations.....................: 71565  2385.134343/s
     vus............................: 100    min=100       max=100 
     vus_max........................: 100    min=100       max=100 

Copy link
Contributor

github-actions bot commented Dec 12, 2024

@benchmarks/server results (ponyfill)

     ✓ no-errors
     ✓ expected-result

   ✓ checks.........................: 100.00% ✓ 295844      ✗ 0     
     data_received..................: 29 MB   971 kB/s
     data_sent......................: 12 MB   394 kB/s
     http_req_blocked...............: avg=1.45µs   min=902ns    med=1.23µs   max=183.1µs  p(90)=1.96µs   p(95)=2.2µs   
     http_req_connecting............: avg=0ns      min=0s       med=0s       max=130.58µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=141.4µs  min=93.13µs  med=134.96µs max=7.93ms   p(90)=158.97µs p(95)=168.18µs
       { expected_response:true }...: avg=141.4µs  min=93.13µs  med=134.96µs max=7.93ms   p(90)=158.97µs p(95)=168.18µs
     http_req_failed................: 0.00%   ✓ 0           ✗ 147922
     http_req_receiving.............: avg=24.76µs  min=12.05µs  med=23.5µs   max=7.82ms   p(90)=30.75µs  p(95)=33.07µs 
     http_req_sending...............: avg=6.38µs   min=4.02µs   med=5.55µs   max=7.28ms   p(90)=8.19µs   p(95)=9.11µs  
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=110.25µs min=69.36µs  med=103.72µs max=7.67ms   p(90)=124µs    p(95)=131.39µs
     http_reqs......................: 147922  4930.560493/s
     iteration_duration.............: avg=198.4µs  min=137.04µs med=190.62µs max=8.7ms    p(90)=219.03µs p(95)=232.49µs
     iterations.....................: 147922  4930.560493/s
     vus............................: 1       min=1         max=1   
     vus_max........................: 1       min=1         max=1   

Copy link
Contributor

github-actions bot commented Dec 12, 2024

@benchmarks/server results (undici)

     ✓ no-errors
     ✓ expected-result

   ✓ checks.........................: 100.00% ✓ 222464      ✗ 0     
     data_received..................: 22 MB   745 kB/s
     data_sent......................: 8.9 MB  297 kB/s
     http_req_blocked...............: avg=1.43µs   min=902ns    med=1.23µs   max=194.11µs p(90)=1.92µs   p(95)=2.07µs  
     http_req_connecting............: avg=1ns      min=0s       med=0s       max=132.16µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=207.84µs min=155.76µs med=195.17µs max=39.86ms  p(90)=220.27µs p(95)=228.95µs
       { expected_response:true }...: avg=207.84µs min=155.76µs med=195.17µs max=39.86ms  p(90)=220.27µs p(95)=228.95µs
     http_req_failed................: 0.00%   ✓ 0           ✗ 111232
     http_req_receiving.............: avg=25.48µs  min=12.24µs  med=24.12µs  max=5.43ms   p(90)=31.13µs  p(95)=33.08µs 
     http_req_sending...............: avg=6.33µs   min=4.08µs   med=5.66µs   max=428.6µs  p(90)=8.11µs   p(95)=8.63µs  
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=176.02µs min=127.92µs med=162.88µs max=39.79ms  p(90)=185.21µs p(95)=193.25µs
     http_reqs......................: 111232  3707.601896/s
     iteration_duration.............: avg=265.24µs min=202.69µs med=251.67µs max=39.99ms  p(90)=280.58µs p(95)=291.62µs
     iterations.....................: 111232  3707.601896/s
     vus............................: 1       min=1         max=1   
     vus_max........................: 1       min=1         max=1   

Copy link
Contributor

github-actions bot commented Dec 12, 2024

@benchmarks/node-fetch results (noConsumeBody)

   ✓ active_handles.................: avg=140.688717 min=103     med=140     max=202      p(90)=160     p(95)=163    
     data_received..................: 23 MB  772 kB/s
     data_sent......................: 15 MB  500 kB/s
     http_req_blocked...............: avg=12.21µs    min=641ns   med=1.45µs  max=29.8ms   p(90)=2.04µs  p(95)=2.36µs 
     http_req_connecting............: avg=10.09µs    min=0s      med=0s      max=29.76ms  p(90)=0s      p(95)=0s     
     http_req_duration..............: avg=19.73ms    min=1.85ms  med=18.99ms max=199.83ms p(90)=24.8ms  p(95)=28.65ms
       { expected_response:true }...: avg=19.73ms    min=1.85ms  med=18.99ms max=199.83ms p(90)=24.8ms  p(95)=28.65ms
     http_req_failed................: 0.00%  ✓ 0           ✗ 151386
     http_req_receiving.............: avg=35.94µs    min=9.51µs  med=23.34µs max=23.65ms  p(90)=38.85µs p(95)=47.56µs
     http_req_sending...............: avg=12.99µs    min=3.29µs  med=6.78µs  max=20.61ms  p(90)=10µs    p(95)=14.34µs
     http_req_tls_handshaking.......: avg=0s         min=0s      med=0s      max=0s       p(90)=0s      p(95)=0s     
     http_req_waiting...............: avg=19.68ms    min=1.8ms   med=18.95ms max=197.36ms p(90)=24.76ms p(95)=28.53ms
     http_reqs......................: 151386 5045.613742/s
     iteration_duration.............: avg=39.6ms     min=14.03ms med=37.85ms max=232.07ms p(90)=46.72ms p(95)=50.65ms
     iterations.....................: 75677  2522.2736/s
     vus............................: 100    min=100       max=100 
     vus_max........................: 100    min=100       max=100 

Copy link
Contributor

github-actions bot commented Dec 12, 2024

@benchmarks/server results (native)

     ✓ no-errors
     ✓ expected-result

   ✓ checks.........................: 100.00% ✓ 232596      ✗ 0     
     data_received..................: 23 MB   779 kB/s
     data_sent......................: 9.3 MB  310 kB/s
     http_req_blocked...............: avg=1.37µs   min=832ns    med=1.16µs   max=170.85µs p(90)=1.88µs   p(95)=2.06µs  
     http_req_connecting............: avg=1ns      min=0s       med=0s       max=123.97µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=195.6µs  min=148.13µs med=183.24µs max=9.99ms   p(90)=210.52µs p(95)=221.13µs
       { expected_response:true }...: avg=195.6µs  min=148.13µs med=183.24µs max=9.99ms   p(90)=210.52µs p(95)=221.13µs
     http_req_failed................: 0.00%   ✓ 0           ✗ 116298
     http_req_receiving.............: avg=25.86µs  min=13.79µs  med=24.39µs  max=643.78µs p(90)=31.72µs  p(95)=33.77µs 
     http_req_sending...............: avg=6.33µs   min=4.18µs   med=5.59µs   max=313.28µs p(90)=8.19µs   p(95)=8.86µs  
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=163.4µs  min=119.21µs med=150.79µs max=9.94ms   p(90)=174.52µs p(95)=184.06µs
     http_reqs......................: 116298  3876.468927/s
     iteration_duration.............: avg=253.54µs min=195.04µs med=240.4µs  max=10.07ms  p(90)=271.5µs  p(95)=285.4µs 
     iterations.....................: 116298  3876.468927/s
     vus............................: 1       min=1         max=1   
     vus_max........................: 1       min=1         max=1   

* Warning: Exceptions thrown by this hook are not caught.
* This means they will buble up to the HTTP server underlying implementation.
* For example, the `node:http` server crashes the entire process on uncaught exceptions.
*/
onResponse?: OnResponseHook<TServerContext & ServerAdapterInitialContext>;
[Symbol.dispose]?: () => void;
Copy link
Owner

Choose a reason for hiding this comment

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

Can we also add docs for those?
#1830

@ardatan ardatan merged commit 95e5ce4 into master Dec 12, 2024
3 checks passed
Copy link
Contributor

🚀 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.62-alpha-20241212140432-8fd4c16f9d3fb49c3275ef673a421204623bc3d9 npm ↗︎ unpkg ↗︎

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