Main Content

Analyze Execution Time Data

After a software-in-the-loop (SIL) or processor-in-the-loop (PIL) execution, you can analyze execution-time data using methods from the coder.profile.ExecutionTime and coder.profile.ExecutionTimeSection classes.

In the following example, you run a SIL execution and apply supplied methods to execution-time data.

Extract Execution Time Data for Kalman Estimator Code

  1.  Run SIL execution to generate execution time data

  2.  Create workspace variable that holds execution time data

  3.  Extract code sections

  4.  Extract execution time data from specific code section

Automate Execution-Time Analysis of Code Generated From MATLAB Functions

You can use the coder.profile.test.runTests function to run software-in-the-loop (SIL) or processor-in-the-loop (PIL) tests of a MATLAB function and produce execution-time metrics for the generated code. To view and analyze the metrics, use the Code Profile Analyzer app.

For more information, see Automate Execution-Time and Stack Usage Profiling of MATLAB Function.

See Also

Topics