Benchmarking lua functions
Posted: Thu Oct 11, 2018 10:04 am
Seeing as there is no way to access either os or socket modules, how can I track how long does a function takes to run over a fixed number of ticks?
Currently im just logging random messages at the start and end of the function, but for very fast/small functions the timestamps are not accurate enough.
I have seen other messages in the forum, like viewtopic.php?f=25&t=52407&p=306807&hil ... rk#p306676 by @Optera with timings over N ticks, but I can't find the code to do that.
Is there any wiki or post that shows how to do it?
Thanks
Currently im just logging random messages at the start and end of the function, but for very fast/small functions the timestamps are not accurate enough.
I have seen other messages in the forum, like viewtopic.php?f=25&t=52407&p=306807&hil ... rk#p306676 by @Optera with timings over N ticks, but I can't find the code to do that.
Is there any wiki or post that shows how to do it?
Thanks