WeCodeThings Library
Library of code bits
Glossary    Contact Us
Need a web designer? visit WeCodeThings.Com for more details
Search  
   
Browse by Category


WeCodeThings Library .: ColdFusion .: ColdFusion Figure out how long it takes to load a page using GetTickCount



ColdFusion Figure out how long it takes to load a page using GetTickCount

Sometimes you want to see how long something takes to complete.
Here is a very simple way of finding out how long a page takes to complete using GetTickCount() Function.
Place this at the top of your code.

<cfset tickBegin = GetTickcount()>

Then paste this at the bottom of your code.

  1. <cfset tickEnd = GetTickcount()>
  2. <cfset totaltime = tickEnd - tickBegin>
  3. <!---Turn it into seconds --->
  4. <cfset totaltime = totaltime / 1000>
  5. <cfoutput>
  6. How Many Seconds it took: #totaltime#
  7. <!---Turn it into Minutes --->
  8. <cfset totaltime = totaltime / 60>
  9. How Many Minutes it took: #totaltime#
  10. <!---Turn it into Hours --->
  11. <cfset totaltime = totaltime / 60>
  12. How Many hours it took: #totaltime#
  13. </cfoutput>

 



How helpful was this article to you?

Related Articles

article ColdFusion Find Out How Long Ago a Date or String was from now
This ColdFusion function accepts a string...

(No rating)  12-3-2009    Views: 399   
article ColdFusion Insert Data Statement Into a Table using ColdFusion CFC CFQueryParam
Be sure that when you type out the field...

  4-28-2009    Views: 1588   
article How to display Random Quote using ColdFusion and the RandRange Function
<!--- Be sure to change...

(No rating)  4-7-2009    Views: 807   

User Comments

Add Comment
No comments have been posted.




.: Powered by Lore .:Code by WeCodeThings Website Design and Development