Linux / Drivers / Perf
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 740 units with 10,262 lines of code in units (64.7% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (228 lines of code)
    • 21 medium complex units (1,127 lines of code)
    • 53 simple units (1,844 lines of code)
    • 664 very simple units (7,063 lines of code)
0% | 2% | 10% | 17% | 68%
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% | 10% | 17% | 68%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 2% | 14% | 19% | 63%
hisilicon0% | 0% | 0% | 13% | 86%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
130 40 2
98 27 1
93 21 1
81 20 1
82 19 2
38 19 2
37 18 2
50 17 2
49 16 1
29 15 3
34 15 1
45 14 1
24 14 2
87 14 1
44 13 2
55 13 2
65 13 1
30 13 2
42 12 1
89 12 1
33 12 1
40 12 4
80 11 1
74 10 1
47 10 3
27 10 1
60 10 1
45 10 1
39 10 2
46 10 2
28 10 1
52 10 2
56 9 1
85 9 1
24 9 1
36 9 2
27 9 1
30 9 2
33 9 1
32 8 2
22 8 1
30 8 1
35 8 3
45 8 1
30 8 2
21 8 1
35 8 1
56 8 1
17 8 5
42 8 1