Collecting Coverage Data
The profiler can also collect coverage data. The difference between this and profiling the model is that the generated files have the extension
.cov and they only indicate the number of times each statement has been executed.
Additionally, existing .cov files are updated instead of being replaced, such that iteration counts of each statement are added up.
After execution, the total execution time and source file coverage information is displayed in the output pane and an annotated version of each source file is written containing the number of times each statement has been executed. The coverage logs will tell you whether two executions of a model take the same path through the source code, independent of the optimization results which might vary if the solver version changes.
Complete the following steps to collect coverage data for a Mosel model:
- In the Run Configurations drop-down list, select the Mosel source file for which you want to collect coverage data.
- Click Run Tools, the fourth button to the right of the Run Configurations drop-down list.
- In the menu that appears, click Show Run Dialog.
- In the Run Model dialog box, set the Run Mode field to Collect Coverage Data.
- Click Run.