Linux / Drivers / Edac
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 1,249 units with 27,208 lines of code in units (69.3% of code).
    • 1 very complex units (231 lines of code)
    • 12 complex units (1,453 lines of code)
    • 91 medium complex units (6,417 lines of code)
    • 183 simple units (7,349 lines of code)
    • 962 very simple units (11,758 lines of code)
<1% | 5% | 23% | 27% | 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
c<1% | 5% | 23% | 27% | 42%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT<1% | 5% | 23% | 27% | 43%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
231 65 2
250 47 8
168 36 2
81 36 1
93 35 1
74 33 2
126 33 2
154 32 3
77 30 2
129 30 2
130 30 4
70 29 2
101 27 2
93 25 2
95 24 11
84 24 4
126 23 1
97 23 1
76 22 2
82 21 1
68 21 1
65 20 2
101 20 1
144 19 1
83 19 2
58 18 2
121 18 1
170 18 2
74 18 4
73 18 1
33 18 2
74 18 3
115 17 2
67 17 2
72 17 1
116 17 1
47 17 1
110 17 2
107 17 2
80 16 3
55 16 1
44 16 2
60 16 6
103 16 1
54 16 4
51 16 2
75 15 1
77 15 5
89 15 2
85 15 4