File Complexity Overall
  • There are 55 files with units, with 7,866 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 0 complex files (McCabe index sum 126-250; 0 lines of code)
    • 8 medium complex files (McCabe index sum 51-125; 2,991 lines of code)
    • 13 slightly complex files (McCabe index sum 26-50; 2,603 lines of code)
    • 34 simple files (McCabe index sum 1-25; 2,272 lines of code)
  • 8 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 38% | 33% | 28%
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
go0% | 0% | 38% | 33% | 28%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
handlers0% | 0% | 58% | 18% | 22%
orcas0% | 0% | 64% | 35% | 0%
protocol0% | 0% | 43% | 30% | 25%
client0% | 0% | 12% | 42% | 44%
metrics0% | 0% | 0% | 45% | 54%
common0% | 0% | 0% | 100% | 0%
server0% | 0% | 0% | 43% | 56%
ROOT0% | 0% | 0% | 0% | 100%
timer0% | 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
handler.go
in handlers/memcached/chunked
572 19 120 21 23
l1l2.go
in orcas
487 16 77 16 23
respond.go
in protocol/binprot
215 20 72 33 32
l1l2batch.go
in orcas
427 16 71 17 20
conn.go
in handlers/memcached/batched
454 7 66 15 25
parser.go
in protocol/binprot
318 8 61 19 32
handler.go
in handlers/memcached/batched
313 21 55 18 12
prot.go
in client/textprot
205 11 53 26 11
l1only.go
in orcas
264 16 50 19 10
main.go
in client/cmd/blast
260 7 43 17 16
handler.go
in handlers/memcached/std
202 16 39 19 5
inmem.go
in handlers/inmem
226 13 37 16 4
locked.go
in orcas
233 19 36 15 6
histograms.go
in metrics
314 11 35 11 9
default.go
in server
127 2 35 28 34
main.go
in client/cmd/setops
229 7 35 15 13
respond.go
in protocol/textprot
111 17 32 29 10
parser.go
in protocol/textprot
143 3 29 20 22
datatypes.go
in common
177 17 29 16 13
prot.go
in client/binprot
194 18 29 15 4
types.go
in protocol/binprot
123 2 28 23 14
headers.go
in client/binprot
163 4 25 15 16
localComm.go
in handlers/memcached/chunked
113 5 25 22 10
listen.go
in server
131 7 24 18 12
main.go
in client/cmd/setget
126 5 24 19 8
stats.go
in client/stats
126 6 23 18 13
169 3 22 13 11
endpoint.go
in metrics
157 11 21 13 3
commands.go
in protocol/binprot
97 18 18 19 1
relay.go
in handlers/memcached/batched
118 4 15 13 10
chunkedLimitedReader.go
in handlers/memcached/chunked
62 4 14 23 10
headers.go
in protocol/binprot
162 6 12 7 3
localComm.go
in handlers/memcached/std
66 2 12 18 7
main.go
in client/cmd/fill
70 3 11 16 6
types.go
in client/common
80 1 11 14 11
utils.go
in client/common
52 6 11 21 4
gauges.go
in metrics
69 5 9 13 3
utils.go
in server
36 2 9 25 5
58 3 7 12 3
flags.go
in client/f
36 1 7 19 7
constructors.go
in handlers/memcached
39 3 7 18 3
counters.go
in metrics
39 4 6 15 2
lzcnt.go
in metrics
27 1 6 22 6
components.go
in protocol/textprot
26 4 6 23 3
main.go
in client/cmd/sizes
48 1 6 13 6
components.go
in protocol/binprot
26 4 5 19 2
bulkcallback.go
in metrics
26 2 4 15 2
types.go
in handlers/memcached/chunked
51 2 4 8 2
keys.go
in handlers/memcached/chunked
19 3 4 21 2
tokens.go
in handlers/memcached/chunked
15 2 3 20 2
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...