Linux / Arch / Riscv
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 991 units with 12,294 lines of code in units (54.7% of code).
    • 2 very complex units (851 lines of code)
    • 1 complex units (77 lines of code)
    • 38 medium complex units (1,998 lines of code)
    • 62 simple units (1,624 lines of code)
    • 888 very simple units (7,744 lines of code)
6% | <1% | 16% | 13% | 62%
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
c8% | <1% | 18% | 15% | 57%
h0% | 0% | 2% | 2% | 94%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
net31% | 0% | 24% | 5% | 38%
kernel0% | 1% | 11% | 14% | 71%
kvm0% | 0% | 30% | 21% | 48%
mm0% | 0% | 5% | 19% | 74%
errata0% | 0% | 0% | 23% | 76%
include0% | 0% | 0% | 0% | 100%
lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
573 235 3
278 140 3
77 33 2
85 23 1
78 20 4
92 20 4
74 20 5
76 20 1
63 19 1
83 19 4
76 18 4
12 18 4
81 18 5
66 17 1
55 16 5
79 16 5
42 15 3
42 15 3
58 15 4
35 15 3
50 14 4
33 14 2
43 14 5
102 13 4
73 12 5
46 12 5
37 12 1
38 12 3
40 11 2
35 11 5
18 11 4
30 11 4
26 11 1
9 11 4
9 11 4
74 11 1
37 11 3
35 11 5
42 11 1
56 11 4
68 11 1
9 10 4
9 10 4
20 10 3
37 9 6
9 9 4
28 9 2
30 9 2
20 9 1
44 9 2