O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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>

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required