I'm not sure if that data is available, it probably is, but when I want 
to time different sections of code here is what I do. It will probably 
work for you.
At the top of the template I create a timing structure, and then any 
point I want to see when the piece of code executed I insert a 
getTickCount() timestamp and label the time. For your purposes getting 
the tickcount at only the top and bottom would suffice.

<cfset timeStruct = structNew()>

<cfset timeStruct['Start'] = getTickCount()>
some code...
<cfset timeStruct['StartBigUglyCode']>
execute BigUglyCode...
<cfset timeStruct['EndBigUglyCode']>
more code...
<cfset timeStruct['End'] = getTickCount()>

GetTickCount() is supposedly accurate to milliseconds, so subtracting 
the start time from the end time will get the time in milliseconds that 
it took the code between to execute.

<cfset TemplateExecutionTime = - timeStruct['End'] - timeStruct['Start']>



jon

Paris Lundis wrote:

>silly question..
>
>you know that template enhanced admin stuff that trails on the bottom 
>of the pages when you specify IPs to report such to?...
>
>well namely the execution time in milliseconds... how can I get that 
>value directly (programmatically)... want to utilize it within code 
>elsewhere... couldn't find any samples or documentation on it...
>
>-paris
>[finding the future in the past, passing the future in the present]
>[connecting people, places and things]
>
>
>
>
>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
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

Reply via email to