Linux / Drivers / Hwtracing
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 1,100 units with 17,170 lines of code in units (67.8% of code).
    • 2 very complex units (568 lines of code)
    • 1 complex units (98 lines of code)
    • 43 medium complex units (2,398 lines of code)
    • 108 simple units (3,388 lines of code)
    • 946 very simple units (10,718 lines of code)
3% | <1% | 13% | 19% | 62%
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
c3% | <1% | 14% | 20% | 61%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
coresight4% | <1% | 14% | 18% | 62%
intel_th0% | 0% | 14% | 25% | 59%
stm0% | 0% | 8% | 27% | 64%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
290 95 2
278 91 2
98 37 4
77 25 3
92 23 1
96 19 1
65 18 4
102 18 1
84 18 3
63 17 4
48 16 2
52 15 1
63 15 7
72 15 1
81 15 3
66 15 3
61 14 2
61 14 2
34 13 1
41 13 1
47 13 2
67 13 2
79 13 2
43 13 5
57 13 2
40 13 2
47 13 5
33 12 3
36 12 1
72 12 4
38 12 3
59 12 4
95 12 2
42 11 1
39 11 4
32 11 2
57 11 3
35 11 3
44 11 2
35 11 4
28 11 3
61 11 2
31 11 1
49 11 3
29 11 3
45 11 3
40 10 1
26 10 1
37 10 4
53 10 1