January 8, 2004

Cold Fusion MX Debugging Report Execution Times

Report Execution Time, allows developers to see the execution time of a page within Cold Fusion when debugging is set for the IP address. It helps to identify pages that take longer to load the the predefined minimum runtime.

With Mach-II framework, the Report Execution Times must be turned off permanently. Otherwise any debugging done on the box with this setting severly degrades the performance of any mach-ii application.

For any application that does not use the mach ii framework, a developer can utilize the following code on the page

<cfif CGI.Remote_Addr is Variables.DebuggingIp>

<cfset Variables.PageStart = GetTickCount()>

</cfif>

<cfif CGI.Remote_Addr is Variables.DebuggingIp>

<cfset Variables.PageEnd = GetTickCount()>

<cfset Variables.PageTime = Variables.PageEnd - Variables.PageStart>

<cfoutput><em>Execution Time: #Variables.PageTime#</em></cfoutput>

</cfif>

For the mach ii framework, there is a trace plugin available to capture this information.

Posted by Elyse at January 8, 2004 8:38 PM | TrackBack
Comments
Post a comment









Remember personal info?