Linux / Drivers / W1
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 368 units with 7,227 lines of code in units (76.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 17 medium complex units (1,041 lines of code)
    • 69 simple units (2,499 lines of code)
    • 282 very simple units (3,687 lines of code)
0% | 0% | 14% | 34% | 51%
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% | 0% | 14% | 34% | 51%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
slaves0% | 0% | 10% | 44% | 44%
masters0% | 0% | 17% | 32% | 49%
ROOT0% | 0% | 18% | 15% | 66%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
75 22 2
115 22 2
72 19 3
73 18 3
66 18 1
85 17 1
68 17 4
53 16 2
64 13 1
39 13 4
50 13 3
28 13 2
57 12 1
73 12 2
28 11 4
55 11 2
40 11 1
45 10 3
42 10 4
43 10 5
41 10 6
72 10 4
55 10 3
61 10 2
99 10 4
34 10 2
43 10 2
23 9 2
42 9 6
46 9 6
36 9 4
46 9 6
46 9 6
19 9 2
38 9 6
31 9 1
43 9 1
43 9 3
27 9 4
34 9 6
29 9 2
23 9 5
67 9 1
31 9 1
35 8 6
39 8 4
34 8 4
69 8 3
39 8 2
45 8 1