Linux / Drivers / Vdpa
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 482 units with 6,746 lines of code in units (79.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (148 lines of code)
    • 6 medium complex units (485 lines of code)
    • 35 simple units (1,402 lines of code)
    • 440 very simple units (4,711 lines of code)
0% | 2% | 7% | 20% | 69%
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% | 7% | 20% | 69%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
vdpa_user0% | 10% | 4% | 18% | 66%
mlx50% | 0% | 7% | 25% | 66%
vdpa_sim0% | 0% | 22% | 3% | 74%
ifcvf0% | 0% | 9% | 17% | 72%
ROOT0% | 0% | 0% | 33% | 66%
virtio_pci0% | 0% | 0% | 18% | 81%
alibaba0% | 0% | 0% | 14% | 85%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
148 30 3
116 22 3
105 15 2
71 14 2
77 13 8
56 13 1
60 12 3
50 10 3
41 10 2
12 10 3
52 10 2
61 9 2
47 9 1
64 9 3
51 9 2
62 9 2
27 9 2
64 9 3
57 9 1
31 8 2
50 8 1
39 8 5
23 7 2
75 7 1
38 7 2
32 7 2
37 7 2
49 7 2
36 7 2
38 7 2
27 6 2
47 6 3
19 6 3
61 6 3
36 6 1
24 6 2
26 6 1
43 6 1
24 6 2
22 6 6
15 6 1
22 6 1
43 5 1
35 5 1
45 5 3
22 5 3
59 5 2
16 5 2
31 5 2
26 5 2