File Complexity Overall
  • There are 38 files with units, with 3,238 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)
    • 4 medium complex files (McCabe index sum 51-125; 1,358 lines of code)
    • 6 slightly complex files (McCabe index sum 26-50; 855 lines of code)
    • 28 simple files (McCabe index sum 1-25; 1,025 lines of code)
  • 7 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 41% | 26% | 31%
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% | 41% | 26% | 31%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
spinnaker0% | 0% | 60% | 0% | 39%
command0% | 0% | 48% | 0% | 51%
config0% | 0% | 100% | 0% | 0%
mysql0% | 0% | 100% | 0% | 0%
deploy0% | 0% | 0% | 66% | 33%
eligible0% | 0% | 0% | 100% | 0%
schedule0% | 0% | 0% | 100% | 0%
grp0% | 0% | 0% | 100% | 0%
term0% | 0% | 0% | 89% | 10%
ROOT0% | 0% | 0% | 0% | 100%
tracker0% | 0% | 0% | 0% | 100%
errorcounter0% | 0% | 0% | 0% | 100%
outage0% | 0% | 0% | 0% | 100%
decryptor0% | 0% | 0% | 0% | 100%
constrainer0% | 0% | 0% | 0% | 100%
env0% | 0% | 0% | 0% | 100%
cal0% | 0% | 0% | 0% | 100%
cmd0% | 0% | 0% | 0% | 100%
clock0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 38)

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
spinnaker.go
in spinnaker
438 16 99 23 10
monkey.go
in config
313 48 73 23 5
mysql.go
in mysql
287 17 64 22 13
chaosmonkey.go
in command
320 9 52 16 41
grp.go
in grp
163 15 42 26 13
eligible.go
in eligible
176 18 41 23 9
schedule.go
in schedule
170 18 38 22 6
96 7 34 35 14
deployment.go
in deploy
133 24 32 24 4
term.go
in term
117 5 26 22 14
terminator.go
in spinnaker
134 6 24 18 11
fromjson.go
in spinnaker
88 1 20 23 20
asg.go
in deploy
61 12 15 25 3
install.go
in command
86 5 15 17 6
109 5 13 12 4
schedule.go
in command
60 4 11 18 4
urls.go
in spinnaker
34 9 10 29 2
app.go
in deploy
56 3 8 14 6
tracker.go
in tracker
31 3 6 19 4
config.go
in spinnaker
27 1 6 22 6
30 2 6 20 4
38 1 5 13 5
errorcounter.go
in errorcounter
21 3 4 19 2
cal.go
in cal
15 2 4 27 3
outage.go
in outage
21 3 4 19 2
decryptor.go
in decryptor
21 3 4 19 2
regions.go
in command
23 1 4 17 4
eligible.go
in command
25 1 4 16 4
constrainer.go
in constrainer
16 3 3 19 1
env.go
in env
16 3 3 19 1
osutil.go
in command
17 2 3 18 2
terminate.go
in command
16 1 3 19 3
14 2 2 14 1
dumpconfig.go
in command
15 1 2 13 2
outage.go
in command
14 1 2 14 2
migrate.go
in command
12 1 2 17 2
clock.go
in clock
12 2 2 17 1
main.go
in cmd/chaosmonkey
13 1 1 8 1
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...