Linux / Drivers / Extcon
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 243 units with 6,204 lines of code in units (68.6% of code).
    • 0 very complex units (0 lines of code)
    • 8 complex units (797 lines of code)
    • 27 medium complex units (1,757 lines of code)
    • 54 simple units (1,945 lines of code)
    • 154 very simple units (1,705 lines of code)
0% | 12% | 28% | 31% | 27%
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% | 12% | 28% | 31% | 27%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 12% | 28% | 31% | 27%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
103 41 2
91 40 1
67 39 1
75 39 1
68 37 1
59 36 1
167 34 1
167 30 1
145 25 1
51 22 1
95 20 1
79 19 1
36 19 2
90 18 1
39 18 2
82 18 1
97 17 2
46 17 1
92 17 1
48 16 2
63 15 1
26 15 2
26 15 2
86 14 1
93 13 1
78 13 1
49 12 4
73 12 1
19 11 2
47 11 1
65 11 1
77 11 3
49 11 3
57 11 1
49 11 1
82 10 1
70 10 2
42 10 1
45 10 4
27 10 1
29 10 1
55 10 2
78 10 3
55 10 1
28 10 1
19 9 2
40 9 4
34 9 3
38 9 2
35 9 1