Linux / Drivers / Tty
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 5,299 units with 92,268 lines of code in units (73.4% of code).
    • 5 very complex units (914 lines of code)
    • 35 complex units (3,873 lines of code)
    • 324 medium complex units (19,242 lines of code)
    • 682 simple units (21,460 lines of code)
    • 4,253 very simple units (46,779 lines of code)
<1% | 4% | 20% | 23% | 50%
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
c<1% | 4% | 20% | 23% | 50%
h0% | 0% | 0% | 10% | 89%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
vt10% | 6% | 24% | 23% | 35%
ROOT1% | 8% | 21% | 24% | 45%
serial0% | 3% | 20% | 22% | 53%
hvc0% | 0% | 16% | 27% | 56%
ipwireless0% | 0% | 23% | 32% | 43%
serdev0% | 0% | 5% | 9% | 84%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
398 145 3
107 73 3
130 59 4
124 53 1
155 52 3
139 49 4
118 48 3
167 48 3
113 46 2
124 44 3
151 43 2
124 39 1
159 38 1
98 36 3
98 36 2
163 36 1
90 35 2
126 35 6
141 34 3
58 33 2
72 33 2
118 31 1
79 30 4
72 30 2
113 29 3
87 29 1
92 29 3
166 29 1
95 29 1
99 28 1
63 27 1
70 27 4
108 27 2
119 27 4
116 27 3
62 26 3
102 26 2
134 26 1
111 26 1
126 26 1
90 25 3
86 25 2
156 25 1
122 25 3
85 25 1
98 25 1
166 25 1
115 24 3
41 24 3
99 24 1