+1 vote

What would be a good way to implement a timer for function testing, benchmarking code, performance testing .. that kind of thing ?

in Engine by (13 points)

For performance testing, you can use OS.get_ticks_msec(), I wrote those micro-benchmarks using lots of iterations: https://github.com/godotengine/godot-tests/blob/master/benchmarks/zylann/gdscript_microtests.gd

That will do it, thank you very much ^^

I added my comment as answer, I should have done that before.

1 Answer

+1 vote

For performance testing, you can use OS.get_ticks_msec(), as an example I wrote those micro-benchmarks using lots of iterations: https://github.com/godotengine/godot-tests/blob/master/benchmarks/zylann/gdscript_microtests.gd

by (29,120 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.