Linux / Drivers / Sbus
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 108 units with 2,351 lines of code in units (65.8% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (51 lines of code)
    • 13 medium complex units (726 lines of code)
    • 20 simple units (572 lines of code)
    • 74 very simple units (1,002 lines of code)
0% | 2% | 30% | 24% | 42%
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% | 30% | 24% | 42%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
char0% | 2% | 30% | 24% | 42%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
51 28 3
53 21 3
60 20 4
70 17 2
63 17 4
85 17 4
25 16 3
118 15 4
45 13 3
45 13 3
22 13 3
54 13 1
36 11 2
50 11 4
48 10 1
23 9 1
25 9 2
35 9 6
37 9 3
29 8 1
32 8 1
20 8 2
27 8 2
34 8 3
34 8 3
24 7 1
27 7 3
35 7 1
24 7 4
26 7 2
22 6 1
23 6 1
23 6 3
24 6 3
25 5 1
44 5 1
22 5 4
24 5 2
20 5 1
22 5 2
31 5 2
11 4 1
11 4 1
24 4 5
19 4 3
19 4 2
13 4 4
14 4 2
14 4 3
17 4 2