Libraries‎ > ‎Library‎ > ‎Miscellaneous‎ > ‎

Define profile procedure

BehaviourComposer: ignore everything before this.

Begin micro-behaviour:

Begin description:

Defines 'profile' that can be used in the command line to profile the next n ticks.

End description

Define profile procedure

Begin NetLogo code:

to profile-command [n]
 profiler:start         ;; start profiling
 repeat n [ go ]        ;; run something you want to measure
 profiler:stop          ;; stop profiling
 print profiler:report  ;; view the results
 profiler:reset         ;; clear the data

End NetLogo code

See for more information.

BehaviourComposer: ignore everything after this.