Linux / Drivers / Ptp
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 277 units with 5,284 lines of code in units (60.5% of code).
    • 1 very complex units (290 lines of code)
    • 1 complex units (100 lines of code)
    • 9 medium complex units (471 lines of code)
    • 29 simple units (1,065 lines of code)
    • 237 very simple units (3,358 lines of code)
5% | 1% | 8% | 20% | 63%
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
c5% | 1% | 8% | 20% | 63%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT5% | 1% | 8% | 20% | 63%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
290 94 3
100 26 5
58 20 2
85 19 3
66 18 1
47 15 4
45 13 2
45 13 2
24 11 3
54 11 2
47 11 4
45 10 4
47 10 1
46 10 4
23 9 4
32 9 1
50 9 3
34 9 3
74 9 1
43 9 2
39 8 3
51 8 1
49 8 2
29 8 4
32 8 3
30 8 3
47 8 1
36 8 2
40 7 3
34 7 4
44 7 2
41 7 2
38 7 4
23 6 3
18 6 2
26 6 3
27 6 2
25 6 1
20 6 1
22 6 3
30 5 2
37 5 2
21 5 4
23 5 4
21 5 4
20 5 4
31 5 1
20 5 2
14 5 3
31 5 2