Charles's suggestion for a profiler extension is great. The profiler extension is incredibly useful. However, this may be redundant for your situation.
Place an order reset-timer and timer . reset-timer sets the internal timer to 0, and then timer reports the time elapsed since reset-timer called (in seconds). Resolution is on the order of milliseconds, but depends on the system.
To call a single procedure call, you should do something like:
reset-timer my-procedure print timer
If you want to understand the average execution time of a procedure, you can simply put it in a repeat block:
reset-timer repeat 1000 [ my-procedure ] print timer
Bryan head
source share