Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Response Time with ASP

Status
Not open for further replies.

josh05

Programmer
Sep 13, 2001
4
US
I have been trying to find code that could help me do this.

I need to open a url and calculate the it's response time. It seems anytime I do this I get the exact same time. I know this is not correct. Does anyone know how to mark a time before the browser navigates and then mark the time when it completes?

Or any direction on how to capture this response time. I cannot edit the page I am testing the response time on so I have been using inset frames. Any help would be great. Thanks.
 
if you're using frames, you can implement a little bit of javascript on it, i dont know exactly how to get it to work specifically, but in theory you should be able to :

Outside frame on : submit, click, whatever you're doing to get the content to load ... Start timer

in frame tag onload : stop and report timer difference

[thumbsup2]DreX
aKa - Robert
 
If you just want the server-side processing time you could use timer to get that value:
Code:
Dim start_time
start_time = timer

'all your code

Response.Write "Processed in " & timer - start_time & "s"

but this of course doesn't take into account the communications time fromclient to server and the (sometimes extreme) load time of the client-side browser. Forthat you would have to go with a javascript solution like DreXors.

Another option would be to use javascript to attach the client-side timeto each link when it is cliecked as pat ofthe querystring. You could then write that into a javascript variable into your new page and us a function in the body onLoad to calculate the difference between the passed time and the currnt time.

-T

-T

01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
The never-completed website:
 
Thanks for the response. I think the javascript would be most accurate. I will give it try. Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top