Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started
by Ben Forta, Raymond Camden, Charlie Arehart
Code Timing
Another challenge in solving problems with ColdFusion code entails understanding how long some piece or section of code takes to execute. Fortunately, ColdFusion offers several tools to help identify code timing:
GetTickCount()
<cftrace>
<cftimer>
cfquery.executiontime
Result attribute
Server monitor profiling feature
One of the oldest ways to identify code timing is to use the getTickcount() function, which returns a number of milliseconds since a point in the past. This function can be used to compare the count of milliseconds at one point to the count at a later point.
However, it can be simpler to use a similar, built-in feature of the <cftrace> tag. When this tag executes, it displays the elapsed time since a previous <cftrace>
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access