Linux / Drivers / Vhost
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 389 units with 6,232 lines of code in units (71.5% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (121 lines of code)
    • 21 medium complex units (1,367 lines of code)
    • 41 simple units (1,346 lines of code)
    • 326 very simple units (3,398 lines of code)
0% | 1% | 21% | 21% | 54%
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% | 1% | 22% | 21% | 54%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 1% | 21% | 21% | 54%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
121 38 3
118 23 1
108 22 7
67 19 3
91 19 2
87 16 5
72 16 2
52 16 3
53 16 3
63 16 3
81 16 8
64 15 3
79 15 3
57 14 3
63 12 3
26 12 2
36 12 5
45 12 3
53 12 1
37 12 3
59 11 7
56 11 2
61 10 2
27 9 5
44 9 5
45 9 1
37 9 2
40 9 6
46 8 2
34 8 2
26 8 2
36 8 2
23 8 2
29 8 2
41 8 2
24 8 5
29 8 6
28 7 6
19 7 2
25 7 1
44 7 2
42 7 3
40 7 1
38 7 1
30 7 1
42 7 2
29 7 2
39 6 4
37 6 6
29 6 6