profile_history - display graphical profiling timeline data

version (57.9 KB) by Yair Altman
Display profiling data as an interactive timeline graph


Updated 30 Jun 2014

View License

profile_history analyzes the latest profiling session and displays the function-call timings and durations in a graphical timeline. The function labels and timeline bars are clickable, linking to their respective detailed profiling report (of the builtin Matlab profiler).

profile_history(profData) displays the timeline of a specific profiling session, that was previously stored via a profData=profile('info') command.

profile_history(initialDetail) or profile_history(profData,initialDetail) displays the timeline showing an initial detail level of a specified number of functions (default initialDetail=15). The detail level can then be changed interactively, using a slider at the bottom of the figure.

Sample usage:
profile on; myProgram(); profile_history
profile on; myProgram(); profData=profile('info'); profile_history(profData)

Technical description:

Note #1:
profile_history uses a wrapper function for the built-in profile.m that is located in the @char subfolder. If for some reason you see problems when running the profiler, simply delete the @char folder. In order to be able to use profile_history after you delete the @char folder, add the -timestamp parameter whenever you profile:
profile on -timestamp; myProgram(); profile_history
(adding the -timestamp parameter is not needed when the @char exists)

Note #2:
This utility relies on the undocumented and unsupported profiler timestamp history functionality, as described in .
It works on all the recent Matlab releases (inc. R2014a), but might stop working in any future Matlab release without prior notice.

Bugs and suggestions:
Please send to Yair Altman (altmany at gmail dot com)

Cite As

Yair Altman (2022). profile_history - display graphical profiling timeline data (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!