tirkarthi commented on issue #60265:
URL: https://github.com/apache/airflow/issues/60265#issuecomment-3739344970

   Thanks, I guess you meant something along below. For api-server with 4 
workers this weirdly this has around same numbers in main without this 
optimization. The numbers also fluctuate wildly once at 80rps and sometimes 
goes to 160rps.
   
   ```python
   @staticmethod
   async def _refresh_user(current_token: str) -> (BaseUser | None, BaseUser | 
None):
       try:
           user = await resolve_user_from_token(current_token)
       except HTTPException:
           return None, None
   
       return get_auth_manager().refresh_user(user=user), user
   ```
   
   ```
   time hey -c 4 -n 100 -H "Cookie: 
_token=eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxIiwianRpIjoiNjRlMTU0MDUxYWE0NDZhYmEwMTgzMmM5NWFjOTk2OGMiLCJpc3MiOltdLCJhdWQiOiJhcGFjaGUtYWlyZmxvdyIsIm5iZiI6MTc2ODIzMjY2OSwiZXhwIjoxNzY4MjM2MjY5LCJpYXQiOjE3NjgyMzI2Njl9.khRYB2UWcpNxBya229jh1OM_VrPMJFJvjCZ_5jLRriuyeET7QCZKGDP58k57J7c9hxPW2DTaw-YnPzXyvOQPVA"
 http://localhost:8000/ui/dags/example_complex/latest_run
   
   Summary:
     Total:     0.5985 secs
     Slowest:   0.0384 secs
     Fastest:   0.0191 secs
     Average:   0.0233 secs
     Requests/sec:      167.0749
     
   
   Response time histogram:
     0.019 [1]  |■
     0.021 [21] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■
     0.023 [30] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
     0.025 [26] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
     0.027 [11] |■■■■■■■■■■■■■■■
     0.029 [5]  |■■■■■■■
     0.031 [5]  |■■■■■■■
     0.033 [0]  |
     0.035 [0]  |
     0.036 [0]  |
     0.038 [1]  |■
   
   
   Latency distribution:
     10% in 0.0201 secs
     25% in 0.0213 secs
     50% in 0.0229 secs
     75% in 0.0247 secs
     90% in 0.0276 secs
     95% in 0.0291 secs
     99% in 0.0384 secs
   
   Details (average, fastest, slowest):
     DNS+dialup:        0.0000 secs, 0.0191 secs, 0.0384 secs
     DNS-lookup:        0.0000 secs, 0.0000 secs, 0.0006 secs
     req write: 0.0000 secs, 0.0000 secs, 0.0002 secs
     resp wait: 0.0230 secs, 0.0188 secs, 0.0367 secs
     resp read: 0.0002 secs, 0.0001 secs, 0.0005 secs
   
   Status code distribution:
     [200]      100 responses
   
   
   hey -c 4 -n 100 -H  http://localhost:8000/ui/dags/example_complex/latest_run 
 0.04s user 0.06s system 16% cpu 0.608 total
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to