Code Profiling in Polyspace Platform User Interface
R2026bCalculate 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
All Profiling
- 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.
Code Coverage
- Review C/C++ Code Coverage Results
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
- Calculate Execution Time of Functions in C/C++ Code
Calculate the execution time of functions in your C/C++ code and address bottlenecks in execution time. - Calculate Memory Use of Functions in C/C++ Code
Calculate the stack memory use of functions in your C/C++ code 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 as sanitizer profiling results. - Guide Code Sanitizer Using Polyspace Code Prover Results
Use Code Prover results to determine which orange checks represent real run-time errors by running the guided sanitizer during test execution. - Issues Detected Using Polyspace Test Code Sanitizer
Find out which issues can be detected at runtime when executing tests with code sanitizer enabled. - Memory Leaks Detected Using Code Sanitizer
Understand the types of memory leaks that the code sanitizer can detect at runtime.