Skip to content

profile

profiler · scripts/profiler/profile.m

: profile command
: s = profile ("status")
: info = profile ("info")

Control the execution profiler.

on

Start collecting data (earlier data is kept). The MATLAB options -detail, -timer, -history and -memory are accepted and ignored.

off

Stop collecting; the data stays available.

resume

Continue collecting without clearing.

clear

Discard all collected data.

status

Return a structure whose field ProfilerStatus is "on" or "off".

info

Return the collected data: the field FunctionTable has one entry per function (name, total time, number of calls, recursion flag, parent and child indices) and Hierarchical holds the call tree.

viewer

Show a text summary of the collected data (no interactive GUI).

report

Print a flat profile table (profshow) and write a static HTML stub via profsave under a temporary directory. This is the headless equivalent of MATLAB’s Profile Report window.