2021-03-08, 10:02 AM
How can I detect how fast a function is running using gettickcount??If anyone can give me an example, or if you know another method.
[Server] Script performance testing
|
2021-03-08, 10:02 AM
How can I detect how fast a function is running using gettickcount??If anyone can give me an example, or if you know another method.
2021-03-08, 11:26 AM
PHP Code: public OnPlayerConnect(playerid)
2021-03-08, 12:35 PM
You just get the tick count at the start of your code and at the end where it is supposed to stop.
Code: new tickcountstart,tickcountend;
2021-03-08, 01:30 PM
thanks
2021-03-08, 07:04 PM
You also may want to read this (and use y_profiling): https://github.com/pawn-lang/YSI-Include...eatures.md
2021-03-08, 07:59 PM
Using GetTickCount is not the right way to do this at all. It only tells you how long a single piece of code might take to run (and very very very inaccurately). It won't tell you which parts are actually slow, nor which parts are run a lot. You need the profiler plugin.
|