Linux / Lib
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,949 units with 56,892 lines of code in units (44.2% of code).
    • 9 very complex units (2,161 lines of code)
    • 42 complex units (5,729 lines of code)
    • 147 medium complex units (8,946 lines of code)
    • 316 simple units (9,953 lines of code)
    • 2,435 very simple units (30,103 lines of code)
3% | 10% | 15% | 17% | 52%
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% | 10% | 15% | 17% | 52%
h0% | 0% | 7% | 19% | 72%
uc0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT3% | 7% | 13% | 19% | 56%
zstd3% | 12% | 23% | 17% | 43%
zlib_inflate41% | 42% | 0% | 2% | 12%
lz413% | 31% | 11% | 14% | 28%
mpi7% | 5% | 32% | 20% | 33%
lzo0% | 74% | 21% | 0% | 4%
xz0% | 14% | 23% | 24% | 37%
crypto0% | 6% | 3% | 7% | 82%
zlib_deflate0% | 14% | 33% | 19% | 32%
zlib_dfltcc0% | 30% | 14% | 15% | 39%
raid60% | 4% | 0% | 1% | 93%
8420% | 11% | 40% | 23% | 24%
math0% | 0% | 13% | 28% | 58%
dim0% | 0% | 24% | 49% | 26%
pldmfw0% | 0% | 15% | 52% | 32%
kunit0% | 0% | 0% | 9% | 90%
vdso0% | 0% | 0% | 51% | 48%
reed_solomon0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
417 111 2
299 84 4
206 81 3
235 77 10
217 68 7
160 62 6
207 61 10
226 55 4
194 52 1
154 48 5
227 47 3
132 46 2
146 46 3
160 44 4
141 43 3
139 43 7
209 42 10
179 42 6
235 41 4
152 40 4
243 40 2
153 40 3
89 39 2
119 38 3
209 37 4
211 36 3
195 36 7
151 36 6
120 35 4
181 35 7
122 35 6
50 35 3
90 34 7
36 34 6
117 33 4
102 33 2
134 33 1
81 32 2
186 32 1
101 32 2
130 32 3
40 32 1
100 32 3
124 31 3
102 31 3
71 28 2
117 28 3
85 28 2
109 27 2
145 27 6