Linux / Drivers / Android
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 158 units with 5,384 lines of code in units (73.1% of code).
    • 3 very complex units (1,484 lines of code)
    • 1 complex units (188 lines of code)
    • 12 medium complex units (813 lines of code)
    • 32 simple units (1,338 lines of code)
    • 110 very simple units (1,561 lines of code)
27% | 3% | 15% | 24% | 28%
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
c27% | 3% | 15% | 24% | 28%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT27% | 3% | 15% | 24% | 28%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
705 94 5
359 91 6
420 76 5
188 42 3
138 24 5
106 23 4
53 20 3
44 15 4
46 15 5
42 15 3
60 12 2
61 12 2
52 11 8
63 11 4
56 11 3
92 11 3
51 10 2
72 10 1
53 9 1
51 9 4
28 9 2
70 9 2
68 8 3
32 8 4
43 8 5
35 8 3
55 8 1
28 7 2
44 7 2
29 7 2
21 7 1
48 7 3
52 7 5
56 7 1
45 6 2
51 6 4
11 6 4
21 6 3
34 6 7
44 6 8
46 6 2
46 6 2
35 6 2
66 6 1
36 6 3
18 6 2
25 6 2
24 6 1
24 5 2
16 5 2