Linux / Drivers / Virt
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 226 units with 5,113 lines of code in units (80.9% of code).
    • 1 very complex units (279 lines of code)
    • 2 complex units (236 lines of code)
    • 19 medium complex units (1,364 lines of code)
    • 30 simple units (1,124 lines of code)
    • 174 very simple units (2,110 lines of code)
5% | 4% | 26% | 21% | 41%
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
c5% | 4% | 27% | 22% | 40%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
acrn19% | 0% | 14% | 17% | 48%
nitro_enclaves0% | 12% | 26% | 23% | 37%
vboxguest0% | 4% | 34% | 22% | 39%
ROOT0% | 0% | 30% | 29% | 39%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
279 81 3
80 48 3
156 33 3
70 22 4
52 20 3
57 19 3
113 19 2
126 18 1
79 18 1
105 16 2
62 16 8
96 14 2
44 14 4
52 14 2
59 13 6
111 13 2
64 12 2
42 12 4
54 12 1
81 12 2
50 11 5
47 11 2
38 10 2
69 10 1
41 10 6
43 10 1
38 9 3
44 9 5
31 9 3
52 8 6
65 8 2
41 8 1
40 8 2
50 8 2
35 8 1
24 8 2
47 7 2
48 7 2
33 7 4
18 7 1
40 7 8
34 7 3
31 7 3
24 7 4
14 7 2
37 7 3
36 7 1
44 6 1
35 6 2
25 6 1