Linux / Drivers / Target
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,367 units with 29,556 lines of code in units (63.8% of code).
    • 1 very complex units (192 lines of code)
    • 13 complex units (1,782 lines of code)
    • 87 medium complex units (5,793 lines of code)
    • 185 simple units (7,259 lines of code)
    • 1,081 very simple units (14,530 lines of code)
<1% | 6% | 19% | 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
c<1% | 6% | 19% | 24% | 49%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT1% | 3% | 13% | 26% | 55%
iscsi0% | 10% | 25% | 23% | 40%
tcm_fc0% | 0% | 29% | 25% | 45%
sbp0% | 0% | 19% | 22% | 58%
loopback0% | 0% | 9% | 10% | 80%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
192 72 3
170 45 3
188 43 2
111 42 3
160 40 3
228 38 5
77 37 2
78 34 2
191 33 1
140 32 1
150 27 1
114 27 3
71 26 3
104 26 1
95 24 2
82 24 1
63 23 2
90 23 1
110 22 2
159 22 3
92 22 1
63 21 2
88 21 2
47 21 2
103 20 2
61 20 2
110 20 3
95 19 2
44 19 1
70 18 2
78 18 2
76 18 3
54 18 3
71 17 1
69 17 1
47 17 2
110 17 1
67 16 3
54 16 2
109 16 2
77 16 3
155 16 3
68 16 3
59 16 3
79 15 2
63 15 2
33 15 2
79 15 1
63 14 1
55 14 2