Code Profiling in Polyspace Platform User Interface
Calculate C/C++ source code coverage with respect to existing tests, calculate execution times
You can calculate C/C++ code coverage, execution time, or memory use in the Polyspace Platform user interface. When you execute tests with coverage, execution profiling or memory profiling enabled, along with test results, you can see how much of your code was covered by the tests, or find bottlenecks in execution time or stack usage.
Polyspace Options
MATLAB Functions
pstest.exportToPolyspaceProfilingResults | (MATLAB Function) Export coverage results from Simulink Coverage, Simulink Test, or MATLAB Test to Polyspace Test |
Topics
Code Coverage
- Calculate C/C++ Code Profiling Metrics in Polyspace Platform User Interface
Calculate code coverage, execution time, and memory use of graphically authored tests on your host computer. - Review C/C++ Code Coverage Results in Polyspace Platform User Interface
Review condition, decision, MC/DC, and other coverage metrics in Polyspace® Platform user interface or Polyspace Access™ web interface. - Merge Coverage Results from Simulink Coverage and Polyspace Test
Gather coverage of generated code using Simulink® Coverage™, coverage of hand written code using Polyspace Test™, and see the merged result in the Polyspace Platform user interface.
Execution Time and Memory Use
- Review and Address Execution Time Results
After calculating the execution time of your code, review the results and address bottlenecks in execution time. - Review and Address Memory Use Results
After calculating the stack memory use of your code, review the results and address possible stack overflow.
Code Sanitization
- Run C/C++ Code Sanitizer and Review Results in Polyspace Platform User Interface
Enable code sanitizer, view sanitizer results as test failures or in sanitizer profiling report. - Issues Detected Using Polyspace Test Code Sanitizer
Find out which issues can be detected at runtime when executing tests with code sanitizer enabled.