cxty ----- > complexity
是覆盖率的一个指标,用的不多,具体请参见
https://www.eclemma.org/jacoco/trunk/doc/counters.html
重点摘录
Cyclomatic Complexity
JaCoCo also calculates cyclomatic complexity for each non-abstract method and summarizes complexity for classes, packages and groups. According to its definition by McCabe1996 cyclomatic complexity is the minimum number of paths that can, in (linear) combination, generate all possible paths through a method. Thus the complexity value can serve as an indication for the number of unit test cases to fully cover a certain piece of software. Complexity figures can always be calculated, even in absence of debug information in the class files.
The formal definition of the cyclomatic complexity v(G) is based on the representation of a method’s control flow graph as a directed graph:
v(G) = E - N + 2
Where E is the number of edges and N the number of nodes. JaCoCo calculates cyclomatic complexity of a method with the following equivalent equation based on the number of branches (B) and the number of decision points (D):
v(G) = B - D + 1
Based on the coverage status of each branch JaCoCo also calculates covered and missed complexity for each method. Missed complexity again is an indication for the number of test cases missing to fully cover a module. Note that as JaCoCo does not consider exception handling as branches try/catch blocks will also not increase complexity.