Timing Request Durations Correctly #23664
              
                Unanswered
              
          
                  
                    
                      darraghjones
                    
                  
                
                  asked this question in
                General
              
            Replies: 1 comment 11 replies
-
| 
         You're starving the thread pool. Change the thread sleep to an async task delay. You don't get more accurate data because the requests are stuck down at the network layer.  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    11 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Given the following most basic of ASP.NET Core applications:
And the following appsettings.json
If I run an even moderate load test (100 requests, using bombardier in my case) I see latency of around 5 seconds.
However, all I see in the logs are
Clearly the requests are taking more than 1 second. I believe the unaccounted 4 seconds are when the request is queued on the ThreadPool.
So my question is how can I measure this latency from inside my application?
Beta Was this translation helpful? Give feedback.
All reactions