Simulink Profiler
Analyze distribution of simulation execution time among model components
Description
The Simulink Profiler runs a profiling simulation of your model and produces a report you can use to analyze the distribution of simulation execution time among model components. Analyzing the report can help you:
Determine whether a close investigation of one or more model components might yield performance improvements for your model
Decide which components to investigate first
In the profiling simulation, the Simulink Profiler measures the total execution time for the simulation and the execution time for each model component, including blocks, subsystems, and model references. When the execution time for a component is unexpected, you might be able to improve the simulation performance by modifying the component implementation. For example, when an S-Function block accounts for most of the execution time, optimizing the S-function code could speed up the simulation.
Open the Simulink Profiler
Simulink® Toolstrip: On the Debug tab, in the Performance section, click the Performance button arrow and select Simulink Profiler.
Examples
Tips
When you want to analyze and improve simulation performance, consider starting the analysis by analyzing your model and simulation configuration using the Performance Advisor.
After analyzing the model and simulation configuration using the Performance Advisor, you can perform deeper analysis by profiling simulations using the Solver Profiler and the Simulink Profiler.
The Solver Profiler analyzes the performance of the selected solver for the model and can be particularly helpful for analyzing the performance of simulations that use variable-step solvers. The profiling results help you identify when and why the step size is limited.
The Simulink Profiler helps you identify bottlenecks for simulation performance by analyzing the distribution of simulation execution time among model components.