Linux / Arch / Sparc
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 2,556 units with 43,867 lines of code in units (44.7% of code).
    • 5 very complex units (1,540 lines of code)
    • 13 complex units (1,349 lines of code)
    • 109 medium complex units (7,246 lines of code)
    • 281 simple units (9,515 lines of code)
    • 2,148 very simple units (24,217 lines of code)
3% | 3% | 16% | 21% | 55%
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% | 2% | 18% | 23% | 51%
h0% | 5% | 1% | 7% | 85%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
net60% | 15% | 2% | 3% | 18%
math-emu84% | 0% | 9% | 6% | 0%
mm3% | 5% | 12% | 27% | 51%
kernel0% | 1% | 21% | 25% | 51%
include0% | 3% | 1% | 6% | 87%
vdso0% | 17% | 11% | 15% | 55%
boot0% | 0% | 59% | 13% | 27%
lib0% | 0% | 17% | 33% | 49%
prom0% | 0% | 4% | 7% | 88%
crypto0% | 0% | 0% | 0% | 100%
power0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
312 190 3
464 145 2
214 121 3
382 98 1
168 52 1
77 50 1
81 42 1
74 41 2
128 35 2
124 35 3
121 34 7
107 34 6
104 33 3
149 30 1
123 30 4
91 29 3
101 29 1
69 29 1
76 25 3
106 25 5
42 23 1
103 23 3
122 23 3
51 23 3
111 23 2
95 23 6
87 22 2
143 22 1
109 21 3
67 21 3
84 21 2
41 20 5
123 20 1
94 20 1
76 20 2
61 19 2
95 19 1
112 19 5
83 19 2
90 19 3
85 19 2
112 19 5
109 19 2
68 18 1
64 18 1
111 18 3
106 18 3
64 17 3
78 17 3
69 17 7