Linux / Drivers / Virtio
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 359 units with 5,797 lines of code in units (76.6% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (133 lines of code)
    • 18 medium complex units (1,242 lines of code)
    • 31 simple units (951 lines of code)
    • 309 very simple units (3,471 lines of code)
0% | 2% | 21% | 16% | 59%
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% | 2% | 21% | 16% | 59%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 2% | 21% | 16% | 59%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
133 27 8
93 24 3
116 22 1
114 20 8
89 17 1
62 17 8
59 16 1
103 16 1
54 15 1
39 14 3
27 14 2
102 13 1
51 13 2
46 12 2
85 12 7
32 11 2
55 11 2
63 11 4
52 11 1
33 10 3
42 9 1
54 9 1
26 8 3
36 8 2
36 8 3
22 8 1
36 7 3
17 7 3
31 7 1
28 7 4
25 7 5
33 7 6
34 7 3
33 7 1
38 7 4
38 7 4
30 7 7
20 6 2
33 6 3
27 6 3
29 6 1
15 6 2
27 6 1
26 6 1
26 6 4
20 6 2
35 6 1
39 6 2
36 6 2
26 6 1