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

End NetLogo code

See http://ccl.northwestern.edu/netlogo/docs/profiler.html for more information.

BehaviourComposer: ignore everything after this.

Comments