Get simulation time for code section
SimTime = NthSectionProfile.Time
example
SimTime = NthSectionProfile.Time returns a simulation time vector that corresponds to the execution time measurements for the code section.
SimTime
NthSectionProfile
collapse all
Run a simulation with a model that is configured to generate a workspace variable with execution time measurements.
rtwdemo_sil_topmodel; set_param('rtwdemo_sil_topmodel',... 'CodeExecutionProfiling', 'on'); set_param('rtwdemo_sil_topmodel',... 'SimulationMode', 'software-in-the-loop (SIL)'); set_param('rtwdemo_sil_topmodel',... 'CodeProfilingInstrumentation', 'on'); set_param('rtwdemo_sil_topmodel',... 'CodeProfilingSaveOptions', 'AllData'); sim('rtwdemo_sil_topmodel');
executionProfile
At the end of the simulation, get profile for the seventh code section.
seventhSectionProfile = executionProfile.Sections(7);
Get vector representing simulation time for code section.
simulationTimeVector = seventhSectionProfile.Time;
coder.profile.ExecutionTimeSection
Object generated by the coder.profile.ExecutionTime property Sections.
coder.profile.ExecutionTime
Sections
Simulation time, in seconds, for section of code. Returned as a vector.
ExecutionTimeInSeconds | ExecutionTimeInTicks | Sections
ExecutionTimeInSeconds
ExecutionTimeInTicks