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.
profile on; myProgram(); profile_history
profile on; myProgram(); profData=profile('info'); profile_history(profData)
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)
This utility relies on the undocumented and unsupported profiler timestamp history functionality, as described in http://UndocumentedMatlab.com/blog/undocumented-profiler-options-part-3#detailed .
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)
Yair Altman (2021). profile_history - display graphical profiling timeline data (https://www.mathworks.com/matlabcentral/fileexchange/46976-profile_history-display-graphical-profiling-timeline-data), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!