> I seem to remember a tag, new to one of the recent versions
> of CF, that would display how long it took to process a bit
> of code. You would surround the code in question with the
> tag and it would return the time value. Am I dreaming this?
> I can't seem to find it now.
You want to use the GetTickCount function. You could save the code below as
a custom tag, say, timer.cfm:
<!--- cf_timer start --->
<cfif ThisTag.ExecutionMode is "start">
<cfset start = GetTickCount()>
<cfelse>
<cfset end = GetTickCount() - start>
<cfoutput>#end#</cfoutput> milliseconds<br>
</cfif>
<!--- cf_timer end --->
Then, you could just wrap your code like this:
<cf_timer>
<cfquery ...>
</cfquery>
</cf_timer>
Of course, there's a bit of overhead in invoking a custom tag, but usually
that won't make any difference for rough measurements.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists