|
Post by votan on Nov 17, 2009 6:22:05 GMT -5
This is a little function I always use to measure the performance of a project an special portions of code. Nothing special but quite usefull if you need to find slowdowns in your projects. The function only measures time your compiled projects takes for given steps... it does not include time used for compiling.
print timer$("start") '---- Put this at the very first beginning of your code. (Use html timer$("start") to avoid an empty line) print timer$("show") '---- put this where you want to show inbetween times print timer$("stop") '---- put this at the end of your output generating code to display the total time needed to build the page
function timer$(timeroption$) global timerstart, timerstop, timercurrent select case timeroption$ case "start" timerstart = time$("milliseconds") case "show" timercurrent = time$("milliseconds") timer$ = "Currently used time: ";timercurrent - timerstart;" ms" case "stop" timerstop = time$("milliseconds") timer$ = "Total page build time: ";timerstop - timerstart;" ms" end select end function
the timer$("stop") option along with the case "stop" is just optional for displaying another message at the end... using "show" does the same.... so the function can be shortened by that "stop" option.
|
|
|
Post by StefanPendl on Nov 18, 2009 13:15:05 GMT -5
Thanks for this nice and clear timing function ;D So where is the profiler
|
|