Linux / Drivers / Mfd
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,196 units with 49,933 lines of code in units (53.8% of code).
    • 25 very complex units (10,049 lines of code)
    • 24 complex units (2,200 lines of code)
    • 142 medium complex units (8,787 lines of code)
    • 260 simple units (9,370 lines of code)
    • 1,745 very simple units (19,527 lines of code)
20% | 4% | 17% | 18% | 39%
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
c20% | 4% | 17% | 18% | 39%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT20% | 4% | 17% | 18% | 39%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
1142 1135 2
1014 1006 2
1009 1001 2
832 827 2
726 718 2
701 694 2
683 676 2
677 670 2
612 604 2
470 462 2
246 239 2
178 171 2
175 168 2
135 128 2
134 125 2
115 108 2
109 102 2
105 98 2
391 83 1
86 81 2
70 63 2
70 63 2
250 54 1
60 53 2
59 52 2
240 48 2
202 47 1
53 46 2
51 44 2
209 43 2
218 42 1
48 40 2
47 40 2
162 40 2
47 39 2
107 37 3
44 36 2
40 34 2
41 34 2
22 33 1
22 33 1
190 32 1
38 31 1
133 31 6
38 31 1
37 30 2
38 30 2
68 26 2
105 26 2
32 25 2