Linux / Arch / Arc
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 419 units with 6,639 lines of code in units (44.9% of code).
    • 2 very complex units (719 lines of code)
    • 2 complex units (260 lines of code)
    • 12 medium complex units (637 lines of code)
    • 32 simple units (1,124 lines of code)
    • 371 very simple units (3,899 lines of code)
10% | 3% | 9% | 16% | 58%
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
c13% | 4% | 11% | 15% | 55%
h0% | 0% | 0% | 25% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
kernel17% | 4% | 13% | 11% | 51%
mm0% | 6% | 6% | 26% | 60%
include0% | 0% | 0% | 25% | 74%
plat-hsdk0% | 0% | 0% | 19% | 80%
plat-axs10x0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
377 116 1
342 93 5
179 47 5
81 26 2
54 25 1
47 20 1
69 19 3
86 16 2
75 15 1
78 14 1
45 13 1
27 12 1
36 12 1
47 12 3
47 12 1
26 12 1
235 10 1
25 10 2
39 10 1
31 9 5
34 9 1
41 9 3
33 9 1
35 8 4
46 8 1
46 8 1
22 8 3
31 8 4
53 8 5
30 8 10
25 8 3
25 7 1
26 7 5
22 7 1
18 7 1
27 7 1
21 7 3
19 7 2
26 7 6
24 7 2
30 6 3
19 6 1
20 6 3
21 6 5
21 6 2
21 6 1
27 6 4
31 6 1
51 5 1
8 5 5