coder.profile.test.runTests
Syntax
Description
runs software-in-the-loop (SIL) or processor-in-the-loop (PIL) tests of the model by using
inputs provided by the model. The function runs in two stages. First, the function runs the
tests with only task profiling enabled. Then, the function runs the most demanding tests
again with detailed function profiling enabled.resultsSet
= coder.profile.test.runTests(modelName
)
In the first stage, runTests
captures the execution times of tasks
for the given inputs. In the second stage, runTests
identifies how code
is executed. For example, it generates a visualization of the function-call stack.
runTests
does not run detailed profiling in the first stage because
instrumentation overhead can be significant and invalidate the acquired time
measurements.
The function stores results in the resultsSet
object. Use the Code Profile
Analyzer to analyze the results.
For information about importing test cases into a model, see Overview of Signal Loading Techniques and Load Input Data for Basic Test Cases.
runs software-in-the-loop (SIL) or processor-in-the-loop (PIL) tests of the model by using
test cases in the Simulink®
Test™ file resultsSet
= coder.profile.test.runTests(modelName
, TestFile='myTestFile')myTestFile
. As explained previously, the
function runs in two stages to reduce the impact of instrumentation overhead.
If the test cases cover system requirements and exercise as many as possible code paths, you can use the function and the Code Profile Analyzer to identify and analyze performance hotspots in the generated code.
runs software-in-the-loop (SIL) or processor-in-the-loop (PIL) tests of the model using one
or more name-value arguments.resultsSet
= coder.profile.test.runTests(..., Name=Value
)
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2024a