coder.profile.test.getCriticalPathElements
Description
returns a cell array of blocks that are in the critical path identified by criticalPathBlocks
= coder.profile.test.getCriticalPathElements(resultsObject
)coder.profile.test.analyzePath
.
Examples
Get Blocks in Critical Path
Use coder.profile.test.getCriticalPathElements
to
get a cell array of blocks in the identified critical path.
Open the CriticalPathIdentify
model.
openExample('CriticalPathIdentify'); model = "CriticalPathIdentify";
Identify the critical path of the generated code by using the
coder.profile.test.analyzePath
function and store the results in
myResults
.
myResults = coder.profile.test.analyzePath(model,SimMode="SIL")
Get a list of the blocks in the identified path.
criticalPathBlocks = coder.profile.test.getCriticalPathElements(myResults)
criticalPathBlocks = 24×1 cell array {'CriticalPathIdentify/If' } {'CriticalPathIdentify/If Action1' } {'CriticalPathIdentify/If Action1/Action Port' } {'CriticalPathIdentify/If Action1/For Iterator1' } {'CriticalPathIdentify/If Action1/For Iterator1/For Iterator'} {'CriticalPathIdentify/If Action1/For Iterator1/Sum' } {'CriticalPathIdentify/If Action1/For Iterator1/Unit Delay' } {'CriticalPathIdentify/If Action1/In1' } {'CriticalPathIdentify/If Action1/Out1' } {'CriticalPathIdentify/If Action2' } {'CriticalPathIdentify/If Action2/Action Port' } {'CriticalPathIdentify/If Action2/For Iterator2' } {'CriticalPathIdentify/If Action2/For Iterator2/For Iterator'} {'CriticalPathIdentify/If Action2/For Iterator2/Sum' } {'CriticalPathIdentify/If Action2/For Iterator2/Unit Delay' } {'CriticalPathIdentify/If Action2/In1' } {'CriticalPathIdentify/If Action2/Out1' } {'CriticalPathIdentify/If1' } {'CriticalPathIdentify/In1' } {'CriticalPathIdentify/In2' } {'CriticalPathIdentify/In4' } {'CriticalPathIdentify/Merge' } {'CriticalPathIdentify/Merge1' } {'CriticalPathIdentify/Out1' }
Input Arguments
resultsObject
— Critical path analysis result
coder.profile.ExecutionTimeSet
object
Critical path analysis result, specified as a
coder.profile.ExecutionTimeSet
object. This object is returned by
the coder.profile.test.analyzePath
function
Output Arguments
criticalPathBlocks
— Blocks in critical path
cell array
Blocks in the critical path, specified as a cell array.
Version History
Introduced in R2024a
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)