Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Milliseconds
Message
De
01/01/2018 15:16:19
 
 
À
01/01/2018 13:47:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01656863
Message ID:
01656874
Vues:
807
>>>>I am sure this has been addressed before. But I would appreciate some quick help.
>>>>
>>>>I am performing some performance testing and have discovered that the Seconds() function may not be actuate. I discovered a UDF based on the SYS(2015), but I question its return. I would like to use the WinAPI GetTickCount(), but it only returns True, no tick count.
>>>>
>>>>Any other suggestions?
>>>
>>>Search for docs for the high perf functions if GetTickCount() is to coarse
>>>(which is between 5 and 40ms AFAIR on NT based systems)
>>>
>>>declare long QueryPerformanceCounter in kernel32.dll ;
>>> string @lpCount
>>>
>>>declare long QueryPerformanceFrequency in kernel32.dll ;
>>> long @lpFrequency
>>>
>>>if you need the resolution they probably used in coverage profiler ;-)
>>
>>Thank you,
>>
>>I will check the Declaration you provided. As for the Coverage Profiler, I use often to validate the code coverage. The timing portion can be helpful, but does not provide real-time numbers.
>
>My guess is it does provide real time numbers, but they are NOT really comparable to runtimes without coverage, as the writing out severly thrashes performance of single lines. With those timers you can get much better picture of runtimes of small code stretches - but to really effective you must write the timing fwk in C (did that once after piping counters into vfp array at first). With Queryperf you are miles ahead of Gettickcount, but the last mile for short calls run a few million times is better in C.
>Just store API results first in C memory space, then after measurement analyze data structure.
>
>Gettickcount usually is good enough for SQL queries, xBase calc calls and finding unoptmised locates.
>But there already is the optimizing output ;-)

To all, thank for your input.
It is obvious that it comes down to the timing resolution of VFP and Windows. So as long as the timing is consistence, I guess the I will have to live with it. Besides, the count will be different on different machines. What I am experiencing is that multiple runs of my test cases result in very different timing result. I believing it may be caused by other window services running in the background.
Greg Reichert
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform