korosuke613 / travis-gtest-cmake-example
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 2,013 units with 15,132 lines of code in units (40.6% of code).
    • 1 very complex units (118 lines of code)
    • 5 complex units (436 lines of code)
    • 42 medium complex units (1,748 lines of code)
    • 100 simple units (2,268 lines of code)
    • 1,865 very simple units (10,562 lines of code)
<1% | 2% | 11% | 14% | 69%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py2% | 9% | 22% | 20% | 44%
cc0% | 0% | 13% | 17% | 68%
h0% | 0% | 1% | 8% | 89%
cpp0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ext<1% | 2% | 11% | 15% | 69%
src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
118 58 1
105 45 2
105 45 2
71 29 2
71 29 2
84 27 2
36 20 2
36 20 2
65 19 2
44 19 3
73 18 0
111 18 5
28 17 1
27 16 1
19 16 3
47 16 3
21 16 2
54 15 2
60 15 4
44 14 3
29 14 0
44 14 2
55 14 2
43 14 0
47 13 7
37 13 2
45 13 1
47 13 7
37 13 2
51 13 3
32 13 1
19 12 1
58 12 1
46 12 2
40 12 2
39 12 1
32 12 2
43 12 2
32 12 1
18 11 1
37 11 1
25 11 1
35 11 3
64 11 2
42 11 5
37 11 1
25 11 1
24 11 2
17 10 1
41 10 0