Determine execution time in ASP

This is a very simple and neat script that allows you to determine the time (in Milli seconds) required to execute the code in an ASP page.

<script language=jscript runat=server>
function GetTime()
{
   var d = new Date();
   return d.getTime();
}
</script>

<%
   Dim StartTime, EndTime
   StartTime = GetTime()
   ' Do some stuff
   EndTime = GetTime()
   
   Response.Write "Process took: " & Cstr(EndTime - StartTime) & " MilliSeconds."
%>

You might also like...

Comments

 Lio

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The difference between theory and practice is smaller in theory than in practice.”