Simulink.profiler.Data
Description
When you profile the execution of a model using the Simulink
Profiler, the profiling results are saved as a Simulink.profiler.Data
object in the simulation metadata. You can use the Simulink.profiler.Data
object to generate the HTML profiler report and to process and analyze the profiling results
programmatically.
Creation
To create a Simulink.profiler.Data
object, profile the execution time for
your model using the Simulink Profiler.
The profiling simulation results are returned as a Simulink.SimulationOutput
object. The SimulationMetadata
property of the SimulationOutput
object contains complete simulation
metadata, including the profiling results.
Access the Simulink.profiler.Data
object that contains the profiling
results through the TimingInfo
property of the
SimulationMetadata
object, which contains a structure with fields that
summarize information about the simulation execution time. The ProfileData
field of the TimingInfo
structure contains the
Simulink.profiler.Data
object.
This code shows how to run a profiling simulation programmatically using the
sim
function and then access the
Simulink.profiler.Data
object that contains the profiling data.
out = sim("MyModel","Profile","on"); profilingData = out.SimulationMetadata.TimingInfo.ProfilerData;
Properties
Object Functions
generateReport | Create report of data from profiling simulation run using Simulink Profiler |
Examples
Version History
Introduced in R2020a