Linux / Drivers / Xen
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 1,009 units with 18,076 lines of code in units (78.9% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (304 lines of code)
    • 42 medium complex units (2,811 lines of code)
    • 159 simple units (5,428 lines of code)
    • 805 very simple units (9,533 lines of code)
0% | 1% | 15% | 30% | 52%
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% | 15% | 30% | 52%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 2% | 17% | 30% | 50%
xen-pciback0% | 2% | 22% | 30% | 44%
xenbus0% | 0% | 7% | 33% | 59%
events0% | 0% | 9% | 24% | 66%
xenfs0% | 0% | 0% | 17% | 82%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
134 30 3
68 28 4
102 27 3
91 23 2
57 23 2
77 23 1
130 20 2
89 20 1
99 20 2
79 20 2
64 20 2
103 20 2
103 19 1
64 18 1
73 18 2
99 17 1
68 16 1
118 16 3
42 16 2
70 15 2
46 15 2
80 14 1
32 14 4
54 14 4
72 14 3
88 13 1
58 13 4
60 13 4
69 13 3
69 13 1
45 13 1
48 12 3
43 12 3
78 12 3
42 12 2
60 12 3
48 12 1
63 12 2
57 12 2
42 11 1
54 11 1
55 11 2
38 11 3
60 11 1
24 11 2
59 10 1
43 10 2
27 10 4
47 10 1
69 10 2