Linux / Drivers / Ntb
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 414 units with 7,468 lines of code in units (74.2% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (279 lines of code)
    • 15 medium complex units (1,229 lines of code)
    • 53 simple units (2,071 lines of code)
    • 344 very simple units (3,889 lines of code)
0% | 3% | 16% | 27% | 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% | 3% | 16% | 27% | 51%
h0% | 0% | 35% | 0% | 64%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
hw0% | 4% | 17% | 23% | 54%
ROOT0% | 0% | 14% | 41% | 44%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
82 44 1
197 42 3
122 25 2
74 19 5
225 18 4
74 17 1
22 16 1
71 16 5
58 15 2
65 15 5
82 14 1
52 13 2
57 12 1
51 12 5
75 12 3
75 11 5
126 11 4
32 10 6
52 10 2
28 9 6
46 9 4
53 9 4
50 9 2
38 9 1
57 9 5
23 9 1
40 9 2
40 8 2
18 8 4
128 8 4
22 8 6
22 8 4
38 8 1
23 8 3
42 8 5
50 8 2
83 8 4
46 8 3
49 8 1
16 7 2
46 7 1
37 7 2
34 7 1
42 7 3
39 7 2
64 7 2
52 7 2
35 6 6
16 6 2
18 6 3