measuring response times when using HttpWebRequest class

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to be able to measure the following when using the HttpWebRequest class;
- host name resolution time
- connect time
- HTTP download time

I realize these metrics are not inherently supported by the class. Can you think of any way to measure these things short of writing my own HTTP implementation on top of Sockets?
 
Nebraska said:
I would like to be able to measure the following when using the
HttpWebRequest class;
- host name resolution time
- connect time
- HTTP download time

I realize these metrics are not inherently supported by the class.
Can you think of any way to measure these things short of writing my
own HTTP implementation on top of Sockets?

Sort of.

1. Host name resolution can be done manually using the Dns class.

2. Connect time and download time can be tracked separately if you're using
async I/O. The callback to BeginGetResponse() could measure the connection
establishment, while the repeated calls to BeginRead on the response stream
could measure the download time.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top