File Complexity Overall
  • There are 71 files with units, with 23,104 lines of code.
    • 2 very complex files (McCabe index sum 251+; 4,084 lines of code)
    • 6 complex files (McCabe index sum 126-250; 6,900 lines of code)
    • 13 medium complex files (McCabe index sum 51-125; 6,050 lines of code)
    • 15 slightly complex files (McCabe index sum 26-50; 2,904 lines of code)
    • 35 simple files (McCabe index sum 1-25; 3,166 lines of code)
  • 57 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system17% | 29% | 26% | 12% | 13%
Legend:
251+
126-250
51-125
26-50
1-25


explore: grouped by folders | grouped by complexity
File Complexity per Extension
251+
126-250
51-125
26-50
1-25
c18% | 31% | 27% | 13% | 9%
h0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
src17% | 30% | 26% | 11% | 13%
contrib0% | 0% | 0% | 73% | 26%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 50)

The McCabe index of a file grows with its size: per 100 lines tells a large but plain file from a dense one, and most complex unit whether the complexity sits in one unit or is spread over many.

File# lines# unitsMcCabe index
(sum)
per 100
lines
most complex
unit
dyn_redis.c
in src/proto
2891 31 744 26 364
dyn_memcache.c
in src/proto
1193 23 304 25 138
943 35 228 24 50
1596 29 217 14 53
1409 60 206 15 45
1156 31 170 15 31
1018 41 168 17 18
778 15 139 18 75
dyn_redis_repair.c
in src/proto
731 14 107 15 13
567 29 106 19 10
709 33 100 14 15
791 29 97 12 18
459 28 96 21 19
438 13 82 19 31
dyn_entropy_util.c
in src/entropy
336 9 66 20 29
394 29 66 17 5
dyn_evport.c
in src/event
323 9 59 18 16
370 15 57 15 12
dyn_kqueue.c
in src/event
318 10 52 16 17
339 12 51 15 8
275 14 51 19 14
246 10 48 20 9
245 6 46 19 24
dyn_jenkins.c
in src/hashkit
233 1 45 19 45
murmur3.c
in contrib/murmur3
193 7 43 22 17
dyn_epoll.c
in src/event
278 9 41 15 11
137 4 37 27 17
dyn_token.c
in src/hashkit
168 11 37 22 9
189 4 35 19 15
dyn_log.c
in src
166 10 35 21 13
dyn_florida.c
in src/seedsprovider
172 5 31 18 20
171 8 31 18 15
dyn_entropy_snd.c
in src/entropy
205 4 31 15 22
117 5 30 26 11
159 8 30 19 14
225 21 28 12 4
184 8 24 13 5
dyn_entropy_rcv.c
in src/entropy
134 2 23 17 20
48 7 22 46 5
dyn_hash_tool.c
in src/tools
117 3 19 16 11
dyn_dns.c
in src/seedsprovider
110 3 18 16 14
dyn_redis_purge.py
in scripts/dynomite
110 6 17 15 6
100 4 17 17 8
83 3 16 19 12
104 5 16 15 5
123 8 15 12 3
161 7 14 9 4
fmemopen.c
in contrib
70 4 13 19 8
71 5 13 18 6
dyn_md5.c
in src/hashkit
210 5 10 5 5
About This Analysis
  • File complexity is the sum of the McCabe indexes (conditional complexity) of the units (methods, functions...) in a file.
  • Files are classified in five categories based on that sum: 1-25 (simple files), 26-50 (slightly complex files), 51-125 (medium complex files), 126-250 (complex files), 251+ (very complex files). The default bands are five times the unit complexity bands, as a file is a group of units.
  • Only main code files with units are classified. Files without units (languages without unit analysis, or files without functions) have no complexity to measure and are left out rather than counted as simple.
  • A very complex file holds many decisions, which often means it has too many responsibilities: a candidate to split, and a place where changes need more testing.
Learn more...