WHY: This tag is helpful in performance testing chunks of code. I use it all the time to see what parts of my code are taking the longest to run.
USAGE: <cf_stopwatch swName="[name_of_returned_structure]" swUnit="[all|milliseconds|seconds|minutes|hours|days]">Some block of code</cf_stopwatch>
RETURNS: <cf_stopwatch> returns a structure by the value assigned to swName.
EXAMPLE: <cf_stopwatch swName="ticktock" swUnit="seconds"> <cfloop from="1" to="50000" index="x"></cfloop> </cf_stopwatch> <cfoutput>It took (#ticktock.seconds#) seconds to complete this loop.</cfoutput>
|