Linux / Drivers / Phy
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,692 units with 37,932 lines of code in units (53.8% of code).
    • 0 very complex units (0 lines of code)
    • 9 complex units (1,120 lines of code)
    • 97 medium complex units (7,081 lines of code)
    • 240 simple units (9,987 lines of code)
    • 1,346 very simple units (19,744 lines of code)
0% | 2% | 18% | 26% | 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% | 2% | 18% | 26% | 51%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cadence0% | 7% | 27% | 27% | 36%
ROOT0% | 10% | 6% | 32% | 50%
ti0% | 4% | 30% | 22% | 42%
allwinner0% | 17% | 13% | 22% | 47%
rockchip0% | 4% | 24% | 28% | 42%
qualcomm0% | 3% | 28% | 20% | 47%
freescale0% | 21% | 0% | 36% | 42%
st0% | 5% | 9% | 17% | 67%
tegra0% | 0% | 15% | 17% | 66%
broadcom0% | 0% | 22% | 25% | 52%
marvell0% | 0% | 16% | 28% | 55%
mediatek0% | 0% | 16% | 14% | 69%
intel0% | 0% | 23% | 37% | 39%
socionext0% | 0% | 23% | 30% | 46%
renesas0% | 0% | 26% | 12% | 60%
hisilicon0% | 0% | 13% | 35% | 51%
samsung0% | 0% | 10% | 43% | 46%
microchip0% | 0% | 8% | 15% | 76%
motorola0% | 0% | 19% | 34% | 45%
lantiq0% | 0% | 18% | 11% | 69%
amlogic0% | 0% | 4% | 50% | 45%
mscc0% | 0% | 9% | 54% | 35%
xilinx0% | 0% | 0% | 48% | 51%
ralink0% | 0% | 0% | 56% | 43%
ingenic0% | 0% | 0% | 21% | 78%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
208 46 1
77 32 3
147 32 1
149 30 1
141 29 1
55 27 1
115 26 1
104 26 3
124 26 3
118 24 1
180 24 1
111 23 1
128 23 1
103 22 1
166 21 1
117 21 1
87 20 1
107 20 1
92 20 2
123 20 1
78 20 1
84 20 1
93 20 1
110 19 1
81 19 5
39 19 2
80 18 2
77 18 1
99 18 1
83 18 1
59 17 1
87 17 1
72 16 2
55 16 1
55 16 1
100 16 1
71 16 3
82 16 1
85 16 1
70 16 1
83 16 1
59 15 1
58 15 1
57 15 3
50 14 1
78 14 1
59 14 1
81 14 1
56 14 1
58 14 2