What is a sample code for execution measure in ms ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
What is a sample code for execution measure in ms ?
Hi,
Looking for some code on :
How to measure start time/ end time difference in mili or micro seconds...
Query exec time measure or simular purpose ?
Couldnt locate any syntax about that still...
Thanks
Looking for some code on :
How to measure start time/ end time difference in mili or micro seconds...
Query exec time measure or simular purpose ?
Couldnt locate any syntax about that still...
Thanks
-
- VIP Livecode Opensource Backer
- Posts: 10048
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: What is a sample code for execution measure in ms ?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: What is a sample code for execution measure in ms ?
Hi.
Go here and read it all. It is an undocumented feature.
http://forums.livecode.com/viewtopic.ph ... croseconds
Craig
Go here and read it all. It is an undocumented feature.
http://forums.livecode.com/viewtopic.ph ... croseconds
Craig
Re: What is a sample code for execution measure in ms ? [SOLVED]
Thanks guys...nice info abuot benchmarking ! Great
Very helpfull, I could come up with some simple code...

Very helpfull, I could come up with some simple code...
Code: Select all
local KronoStart
on dostartkrono
put the milliseconds into KronoStart
put "Chrono is ON" into field KronoTime
end dostartkrono
local KronoEnd
on doendkrono
put the milliseconds into KronoEnd
put (KronoEnd - KronoStart)&" ms" into field KronoTime
end doendkrono

-
- VIP Livecode Opensource Backer
- Posts: 10048
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: What is a sample code for execution measure in ms ?
As I discussed in the article, for durations that short you'll want to get the average of many iterations.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: What is a sample code for execution measure in ms ?
Hi.
So you are satisfied with milliseconds only? This is a standard function in LC, like the "ticks" or the "seconds". I thought you were interested in microSeconds.
Note that if you do indeed go down to that level, Richard's comment about taking running averages is even more important, since the machine running such timing gadgetry has a timing mind of its own.
Craig
So you are satisfied with milliseconds only? This is a standard function in LC, like the "ticks" or the "seconds". I thought you were interested in microSeconds.
Note that if you do indeed go down to that level, Richard's comment about taking running averages is even more important, since the machine running such timing gadgetry has a timing mind of its own.

Craig
Re: What is a sample code for execution measure in ms ?
If you really want precision there is also "the long milliseconds" but you'll probably want an even larger pool of averages.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com