Sunday, April 29, 2018

Correct way of measuring HTTP response using .Net?

I’m using the below syntax in Powershell to give an estimate of the HTTP response time for the request. I’m not looking for bang on timing but at least to the second.

[System.Diagnostics.Stopwatch]::StartNew();Invoke-WebRequest -Uri $URI;[System.Diagnostics.Stopwatch]::StartNew().Stop();[System.Diagnostics.Stopwatch]::StartNew().Stop().Elapsed

Is the above a reasonable counter for nanoseconds/seconds taken?

Correct way of measuring HTTP response using .Net? Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team