Linux / Drivers / Thermal
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,062 units with 19,317 lines of code in units (62.7% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (288 lines of code)
    • 56 medium complex units (3,764 lines of code)
    • 129 simple units (4,574 lines of code)
    • 875 very simple units (10,691 lines of code)
0% | 1% | 19% | 23% | 55%
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% | 19% | 23% | 55%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
qcom0% | 7% | 30% | 30% | 31%
ti-soc-thermal0% | 16% | 0% | 33% | 49%
ROOT0% | 0% | 18% | 20% | 60%
intel0% | 0% | 17% | 27% | 55%
tegra0% | 0% | 20% | 32% | 46%
samsung0% | 0% | 37% | 5% | 56%
broadcom0% | 0% | 19% | 18% | 61%
st0% | 0% | 10% | 9% | 79%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
150 36 1
138 35 1
61 22 1
115 22 1
94 22 6
108 21 1
106 21 1
113 21 1
102 20 1
131 19 1
57 19 3
41 19 2
165 19 2
91 18 1
75 18 1
92 18 1
90 18 1
126 17 1
104 17 1
77 16 1
66 16 2
48 15 3
73 15 1
60 15 1
30 14 1
47 14 4
53 14 1
78 13 2
67 13 3
60 13 2
49 13 1
65 13 1
50 13 3
49 12 1
43 12 2
22 12 1
65 12 2
59 12 4
64 12 1
48 12 4
44 12 2
90 12 2
44 12 2
84 12 1
66 12 4
77 11 4
28 11 3
29 11 3
48 11 3
74 11 1