Linux / Arch / Sh
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,611 units with 21,081 lines of code in units (33.5% of code).
    • 2 very complex units (415 lines of code)
    • 4 complex units (558 lines of code)
    • 23 medium complex units (1,553 lines of code)
    • 102 simple units (3,335 lines of code)
    • 1,480 very simple units (15,220 lines of code)
1% | 2% | 7% | 15% | 72%
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
c2% | 2% | 7% | 17% | 69%
h0% | 0% | 1% | 3% | 94%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
kernel4% | 5% | 5% | 21% | 63%
boards0% | 0% | 8% | 5% | 86%
mm0% | 0% | 13% | 14% | 72%
drivers0% | 0% | 13% | 26% | 60%
include0% | 0% | 1% | 3% | 94%
lib0% | 0% | 0% | 0% | 100%
math-emu0% | 0% | 0% | 0% | 100%
boot0% | 0% | 0% | 0% | 100%
cchips0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
245 76 2
170 56 1
181 45 1
124 39 5
108 31 4
145 28 3
135 20 6
67 18 3
66 16 3
54 16 3
63 16 2
90 15 1
46 15 1
292 14 1
53 13 1
36 13 5
48 13 1
77 13 5
43 13 2
38 12 3
39 12 3
55 12 2
51 12 1
41 12 1
59 11 1
36 11 5
35 11 4
50 11 1
79 11 2
25 10 3
33 10 2
44 10 1
30 10 3
26 10 2
59 10 3
54 10 3
59 10 3
54 10 3
46 10 2
37 10 2
35 10 2
29 10 3
47 9 1
33 9 1
99 9 1
34 9 1
27 9 3
42 9 2
49 9 4
46 9 2