Linux / Drivers / Spi
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,530 units with 52,873 lines of code in units (74.8% of code).
    • 0 very complex units (0 lines of code)
    • 17 complex units (2,222 lines of code)
    • 206 medium complex units (14,690 lines of code)
    • 357 simple units (12,976 lines of code)
    • 1,950 very simple units (22,985 lines of code)
0% | 4% | 27% | 24% | 43%
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
c0% | 4% | 27% | 24% | 43%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 4% | 27% | 24% | 43%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
97 50 2
174 37 3
129 36 3
93 35 3
111 33 2
132 32 1
95 30 3
161 30 1
115 30 3
154 29 1
100 29 3
156 28 2
179 28 1
123 28 2
60 28 2
186 27 1
157 26 1
96 25 1
185 25 1
94 25 2
87 24 1
128 24 1
147 24 1
181 23 2
114 23 1
141 23 1
86 23 3
137 23 1
69 22 3
65 22 2
158 22 1
80 22 3
91 22 3
130 22 1
131 22 1
120 21 3
40 21 3
71 21 2
139 21 1
80 21 4
68 20 2
69 20 2
80 20 2
75 20 3
96 20 3
93 20 3
98 20 4
93 20 4
69 19 1
86 19 4