Linux / Drivers / Power
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,134 units with 46,878 lines of code in units (71.6% of code).
    • 3 very complex units (737 lines of code)
    • 25 complex units (3,018 lines of code)
    • 189 medium complex units (11,758 lines of code)
    • 360 simple units (12,029 lines of code)
    • 1,557 very simple units (19,336 lines of code)
1% | 6% | 25% | 25% | 41%
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% | 6% | 25% | 25% | 41%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
supply1% | 6% | 25% | 25% | 40%
reset0% | 0% | 9% | 26% | 64%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
270 87 1
280 73 2
187 55 3
107 47 3
167 45 3
118 44 3
147 43 3
126 42 3
115 41 3
145 36 1
106 35 1
153 33 2
98 32 2
157 32 1
119 32 1
112 32 3
93 31 3
100 30 3
88 29 3
96 28 3
73 28 3
97 27 3
172 27 2
215 26 1
88 26 3
86 26 3
101 26 2
139 26 1
67 25 3
89 24 1
75 24 1
104 23 2
98 23 3
69 23 1
74 22 3
97 22 1
98 22 1
90 22 1
101 22 2
111 21 4
117 21 2
35 21 1
81 21 3
82 21 1
101 21 1
67 21 2
97 21 1
145 20 1
93 20 2
92 20 2