title: Response time different in Postman/Jmeter and web API
body: <p>I have an MVC Web aPI and I have trouble in comparing the response time of this API. I added some code to calculate the response time:</p>
  
  <p>In the AuthorizationFilterAttribute OnAuthorization, I have the below code:</p>
  
  <pre><code>actionContext.Request.Headers.Add("RequestStartTime", DateTime.Now.ToString());
  </code></pre>
  
  <p>I have an ActionFilterAttribute, and an OnActionExecuted in which I have the below code:</p>
  
  <pre><code>string strRequestStartTime = actionExecutedContext.Request.Headers.GetValues("RequestStartTime").First();
  DateTime dtstartTime = DateTime.Parse(strRequestStartTime);
  TimeSpan tsTimeTaken = DateTime.Now.Subtract(dtstartTime);
  actionExecutedContext.Response.Headers.Add("RequestProcessingTime", tsTimeTaken.TotalMilliseconds + "ms");
  </code></pre>
  
  <p>The response has the header "RequestProcessingTime" in milli seconds. The issue is whenever I try the same request using Postman/JMeter, I see that the response time is lesser than what I see in my Response. Why is this happening?</p>