devxlogo

Determine How Fast Your ASP Scripts Really Are

Determine How Fast Your ASP Scripts Really Are

Often when you’re developing script, you may want to determinejust how long the code takes to run. To do so, take advantage ofASP’s built-in Timer function. As you may know, this functionreturns the number of seconds since midnight. To use thisfunction, capture the current value before your script runs,then again afterwards, and compare the two. While thismethod can vary depending on processor speeds, it providesa decent benchmark.

 <% myStart = timer %>Start: <%= myStart%>
<% For x = 1 to 1000 set myObj = Server.CreateObject("ADODB.Recordset")set myObj = nothingNextmyEnd = timer%>End: <%=myEnd%>
Ellapsed Time: <%= myEnd - myStart %> (seconds)
See also  How to Create and Deploy QR Codes Online: A Comprehensive Guide
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist