Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between "total coverage" and "code coverage" in rcov?

When rcov generates a report, it shows "total coverage" and "code coverage" for each file. What's the difference between the two metrics?

like image 818
mkelley33 Avatar asked Mar 19 '13 22:03

mkelley33


1 Answers

From http://www.rubydoc.info/github/relevance/rcov/master/Rcov/FileStatistics

total_coverage is:

Total coverage rate if comments are also considered "executable", given as a fraction

code_coverage is:

Code coverage rate: fraction of lines of code executed, relative to the total amount of lines of code (loc).

Unless a project's comments are considered executable, the most valuable metric will be "code coverage".

like image 130
mkelley33 Avatar answered Oct 23 '22 20:10

mkelley33