Linux / Drivers / S390
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 3,141 units with 63,005 lines of code in units (62.0% of code).
    • 2 very complex units (490 lines of code)
    • 21 complex units (2,185 lines of code)
    • 225 medium complex units (13,755 lines of code)
    • 483 simple units (16,475 lines of code)
    • 2,410 very simple units (30,100 lines of code)
<1% | 3% | 21% | 26% | 47%
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% | 3% | 22% | 26% | 47%
h0% | 0% | 6% | 11% | 81%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
crypto4% | 9% | 34% | 19% | 31%
net0% | 3% | 26% | 26% | 43%
block0% | 4% | 21% | 24% | 49%
cio0% | <1% | 12% | 28% | 58%
char0% | 1% | 12% | 32% | 53%
scsi0% | 0% | 15% | 27% | 57%
virtio0% | 0% | 15% | 39% | 45%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
416 105 3
74 66 1
163 46 3
90 43 7
103 37 4
93 37 7
74 34 5
70 33 9
105 32 4
94 31 5
130 31 2
77 30 5
144 30 4
107 29 3
94 29 2
135 29 9
155 28 2
83 27 3
83 27 3
91 27 3
104 27 2
90 27 1
100 26 7
86 25 3
50 25 3
122 24 1
76 23 4
80 23 4
78 23 6
60 23 3
64 22 5
64 22 3
77 22 3
89 22 7
60 21 7
132 21 1
29 21 1
84 21 3
91 21 3
73 21 3
49 20 2
108 20 8
81 20 3
42 20 4
77 20 2
58 20 2
99 19 1
80 19 2
87 19 3
70 19 1