Linux / Drivers / Vfio
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 470 units with 10,255 lines of code in units (85.0% of code).
    • 2 very complex units (659 lines of code)
    • 4 complex units (399 lines of code)
    • 50 medium complex units (2,818 lines of code)
    • 88 simple units (2,587 lines of code)
    • 326 very simple units (3,792 lines of code)
6% | 3% | 27% | 25% | 36%
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
c6% | 3% | 27% | 25% | 36%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pci9% | 2% | 34% | 22% | 30%
ROOT6% | 7% | 21% | 28% | 36%
platform0% | 0% | 24% | 31% | 43%
fsl-mc0% | 0% | 28% | 38% | 33%
mdev0% | 0% | 23% | 0% | 76%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
391 100 3
268 76 3
101 29 3
130 28 3
86 27 9
82 27 2
63 23 5
84 23 2
60 22 6
92 22 3
76 22 3
76 22 6
66 21 3
88 21 6
71 20 3
68 20 5
119 20 2
63 19 3
62 19 5
41 18 6
61 18 3
70 17 5
63 17 1
34 16 6
52 16 6
56 16 2
47 16 6
44 15 4
56 15 3
69 15 1
63 15 1
52 14 2
55 14 2
35 13 2
31 13 2
51 13 3
37 13 4
41 13 2
56 12 1
57 12 2
59 12 1
66 12 2
56 12 3
58 11 1
38 11 2
41 11 1
49 11 5
52 11 5
29 11 2
41 11 6