SA-MP Forums Archive
Benchmarking - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Benchmarking (/showthread.php?tid=290590)



Benchmarking - wups - 16.10.2011

I've benchmarked some of my functions in the game mode.
pawn Код:
Bench for OnPlayerUpdate: executes, by average, 1073.64 times/ms. // on foot
Bench for Gas: executes, by average, 0.96 times/ms. // This is a car loop, that's called every 10secs
Bench for OnPlayerUpdate: executes, by average, 215.36 times/ms. // in car
What do you guys think? Are the times okay?


Re: Benchmarking - wups - 16.10.2011

Quote:
Originally Posted by ******
Посмотреть сообщение
Well that may cause problems if you decide to call OnPlayerUpdate 1,000,000 times in a second, but other than that you should be fine! Only you can say if the times are OK or not - if those are all the server does then yes, if that's only 0.1% of your running code then you may have more of an issue.

Basically, does your server lag? If not, then don't worry about it.
Thanks for the tip.