Page 1 of 1
Keeping track of time taken by each handler and function
Posted: Wed Feb 01, 2023 3:36 pm
by kaveh1000
I have a stack with several scripts and many handlers. I want to track taken by each hander and functions in order to see where the bottlenecks are and make them more efficient. I now put these lines around each handler:
Code: Select all
put the millisecs into ms
answer the millisecs - ms
but it is labour intensive. Any way of tracking times taken by handlers without this method?. Thanks.
Re: Keeping track of time taken by each handler and function
Posted: Wed Feb 01, 2023 4:13 pm
by dunbarx
Kaveh1000
I assume you meant something like:
Code: Select all
on mouseUp
put the milliseconds into startTime
doStuff
answer the milliseconds - startTime
end mouseUp
Gives the time to do "doStuff". But it is only two extra lines of code. Why do you think this is labor intensive?
Craig
Re: Keeping track of time taken by each handler and function
Posted: Wed Feb 01, 2023 4:25 pm
by kaveh1000
Hi Craig
I have probably 100 or more handlers. Also each handler has other handlers and functions inside. So I am having to put these lines around each handler one by one. So was wondering any way of getting a list of every handler and the time it took to do its job!
Regards
Kaveh
Re: Keeping track of time taken by each handler and function
Posted: Wed Feb 01, 2023 4:48 pm
by FourthWorld
4W Flight Recorder will give you relative times of everything triggered while it's monitoring.
You can get it from the Stacks section of LiveNet - in the IDE see Development -> Plugins -> GoLiveNet
Re: Keeping track of time taken by each handler and function
Posted: Wed Feb 01, 2023 5:59 pm
by mtalluto
You can use the built in profiler. It works similarly to Richard’s flight recorder.
Re: Keeping track of time taken by each handler and function
Posted: Wed Feb 01, 2023 6:03 pm
by kaveh1000
Thanks Mark. Seems Profiler only in Business edition

Re: Keeping track of time taken by each handler and function
Posted: Wed Feb 01, 2023 7:37 pm
by bn
kaveh1000 wrote: ↑Wed Feb 01, 2023 6:03 pm
Thanks Mark. Seems Profiler only in Business edition
PowerDebug from Mark Wieder has a profiling option. Similar to the profiling of the business edition.
It is not free but it is a lifetime license.
https://www.ahsoftware.net/PowerTools/PowerDebug.lc
Kind regards
Bernd
Re: Keeping track of time taken by each handler and function
Posted: Thu Feb 02, 2023 7:09 pm
by kaveh1000
Thank you all. I had no idea about any of these tools.
