Linux / Drivers / Regulator
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 1,650 units with 35,847 lines of code in units (48.1% of code).
    • 3 very complex units (603 lines of code)
    • 13 complex units (1,583 lines of code)
    • 139 medium complex units (8,944 lines of code)
    • 248 simple units (8,690 lines of code)
    • 1,247 very simple units (16,027 lines of code)
1% | 4% | 24% | 24% | 44%
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
c1% | 4% | 24% | 24% | 44%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT1% | 4% | 24% | 24% | 44%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
198 60 4
248 56 1
157 51 1
49 42 3
120 38 1
152 35 1
139 35 5
63 35 3
139 33 1
136 31 2
181 31 1
98 30 2
164 29 2
132 28 2
96 27 2
114 26 3
140 25 1
101 25 2
135 25 1
85 24 1
97 24 5
100 24 2
95 23 3
86 23 3
83 23 2
155 22 1
96 22 2
123 22 1
121 21 2
92 21 2
82 20 1
60 20 1
89 20 2
105 20 1
150 20 2
77 20 3
93 20 2
108 20 2
106 19 2
90 19 6
112 18 1
57 18 3
90 18 1
68 18 1
97 18 1
104 18 1
73 17 2
101 17 2
56 17 1
88 17 5