Linux / Drivers / Nvme
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 686 units with 11,311 lines of code in units (66.2% of code).
    • 1 very complex units (300 lines of code)
    • 2 complex units (204 lines of code)
    • 36 medium complex units (2,026 lines of code)
    • 78 simple units (2,525 lines of code)
    • 569 very simple units (6,256 lines of code)
2% | 1% | 17% | 22% | 55%
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
c2% | 1% | 18% | 22% | 54%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
host2% | 1% | 17% | 22% | 55%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
300 67 2
90 26 2
114 26 1
41 25 1
85 23 1
95 21 1
67 20 1
21 19 1
86 18 3
51 18 9
77 17 1
34 17 4
123 17 3
78 16 2
66 15 2
55 15 1
49 15 2
21 15 3
41 15 1
51 14 2
37 14 2
68 13 2
48 13 3
49 13 4
64 13 3
51 13 2
86 12 3
37 12 1
28 12 3
43 12 1
53 12 2
46 12 2
37 11 1
49 11 5
43 11 3
42 11 3
76 11 2
57 11 2
71 11 5
51 10 1
47 10 2
38 10 1
55 10 3
67 10 2
38 10 1
24 10 3
43 10 4
56 10 4
47 10 2
44 10 2