PDA

Click to See Complete Forum and Search --> : timing in my asp page


dvst8
Jun 11th, 2000, 08:24 PM
i want to time how long it takes to query my database on my ASP page.

in VBScript is Timer the only timing function I have access to ?? Is this the best accuracy I can get (accurate to 1s) ??

I would like up to ms accuracy!

Thanks.

Clunietp
Jun 12th, 2000, 05:05 AM
you probably don't want to make a VB component to get it for you, but this server side javascript works well...

enjoy


<%@ Language=VBScript%>
<SCRIPT LANGUAGE=JAVASCRIPT RUNAT=SERVER>

function getMscs()
{
var d = new Date();

return(d.getMilliseconds());


}
</SCRIPT>
<HTML>
<BODY>
<%
dim lngCounter

'show start MS
Response.Write "START: " & getMscs()
%>

<BR>
HELLO WORLD
<BR>

<%
'do stuff
for lngCounter = 1 to 100000
lngCounter = lngCounter + 1
next

'show end MS
Response.Write "END: " & getMscs()
%>
</BODY>
</HTML>



Tom

dvst8
Jun 12th, 2000, 09:41 PM
Thanks for the code.
/d8/

Clunietp
Jun 12th, 2000, 11:20 PM