- Classic ASP file upload limit of 200kb in IIS 7L
- Find Column with Lower Case Text
- 0x8007232B DNS Name Does Not Exist Error on Windows Activation
- How to update a column with incrementing numbers
- How to get top N rows for each group?
- How to put a column into a delimited form
- How to export results of a stored procedure to a txt file
- Parsing delimited words from a column
- How to get N-th max value
- How to get a random row from a table
Home :: Tips & Tricks :: Active Server Pages
Determine How Fast Your ASP Scripts Really Are
Often when you're developing script, you may want to determine just how fast the code takes to run. To do so, take advantage of ASP's built-in Timer function. As you may know, this function returns the number of seconds since midnight. To use this function, capture the current value before your script runs, then again afterwards, and compare the two. While this method can vary depending on processor speeds, it provides a decent benchmark.
<% myStart = timer %>
<b>Start: <%= myStart%></b><br/>
<%
For x = 1 to 1000
set myObj = Server.CreateObject("ADODB.Recordset")
set myObj = nothing
Next
myEnd = timer%>
<b>End: <%=myEnd%></b><br/>
<b>Ellapsed Time: <%= myEnd - myStart %> (seconds)</b>
Source: Mike D. Jones