Main Content

Simulink.profiler.Data

Programmatically access Simulink Profiler information

Since R2020a

Description

The Simulink.profiler.Data object provides access to simulation profiling metadata.

Creation

Access the Simulink.profiler.Data object from the SimulationMetadata.TimingInfo field of the Simulink.SimulationOutput object.

Properties

expand all

This is a read only property.

Identifier of the profiling session, returned as a character vector or string scalar.

Example: 'vdp @ 21-Nov-2019 13;48:00'

Data Types: char | string

Use the UserString field to document relevant information about the current profiling session

Example: profilingData.UserString = "Updated gain to reduce chatter.";

Data Types: char | string

Block hierarchy of the model, returned as a Simulink.profiler.UINode object with the following fields:

FieldValueDescription
totalTimedouble

Execution time of the block, as well as its children.

selfTimedouble

Execution time of the block, excluding its children

numberOfCallsdouble

Number of times the block was executed during the simulation.

childrenSimulink.profiler.UINode array

Contents of the current block

pathstring scalar

Path of the block relative to the top level of the model.

Note

The path of the rootUINode field is the name of the model

A Simulink.profiler.UINode object corresponds to a row in the block hierarchy view of the Simulink® Profiler.

Execution phases of the model, returned as a Simulink.profiler.ExecNode object with the following fields:

FieldValueDescription
totalTimedouble

Execution time of the stack element, as well as its children.

selfTimedouble

Execution time of the stack element, excluding its children

numberOfCallsdouble

Number of times the stack element was executed during the simulation.

location Specific phase of the model's execution
childrenSimulink.profiler.ExecNode array

Similar tasks corresponding to the execution phase of the parent.

objectPathstring scalar

Path of the model element corresponding to the current element of the execution stack.

Note

The objectPathfield of the rootExecNode is the name of the model

A Simulink.profiler.ExecNode object corresponds to a row in the execution stack view of the Simulink Profiler.

Version History

Introduced in R2020a