Linux / Drivers / Ata
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,100 units with 42,755 lines of code in units (74.4% of code).
    • 5 very complex units (947 lines of code)
    • 13 complex units (1,435 lines of code)
    • 141 medium complex units (8,758 lines of code)
    • 296 simple units (10,306 lines of code)
    • 1,645 very simple units (21,309 lines of code)
2% | 3% | 20% | 24% | 49%
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
c2% | 3% | 20% | 24% | 49%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT2% | 3% | 20% | 24% | 49%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
280 75 6
167 64 1
154 62 1
195 55 1
151 52 2
157 39 6
59 36 2
97 36 2
82 34 3
206 34 2
96 33 2
119 33 4
84 31 1
161 29 2
114 28 1
75 28 1
63 27 2
122 27 1
146 24 1
126 24 4
42 23 2
94 23 2
47 23 1
99 23 1
115 23 2
74 22 1
36 22 3
110 22 7
61 22 1
86 21 2
97 21 2
108 21 1
99 21 1
118 21 1
64 21 1
103 20 1
82 20 2
83 19 1
71 19 7
53 19 3
75 18 2
52 18 5
50 18 1
56 18 5
53 18 2
80 18 2
99 18 2
84 18 2
62 18 3
95 18 1