File Complexity Overall
  • There are 123 files with units, with 12,021 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)
    • 6 medium complex files (McCabe index sum 51-125; 1,919 lines of code)
    • 19 slightly complex files (McCabe index sum 26-50; 3,877 lines of code)
    • 98 simple files (McCabe index sum 1-25; 6,225 lines of code)
  • 12 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 0% | 15% | 32% | 51%
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% | 15% | 32% | 51%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
metadata0% | 0% | 70% | 14% | 15%
query0% | 0% | 77% | 0% | 22%
cmd0% | 0% | 0% | 48% | 51%
labd0% | 0% | 0% | 53% | 46%
peer0% | 0% | 0% | 70% | 29%
transformers0% | 0% | 0% | 59% | 40%
labagent0% | 0% | 0% | 55% | 44%
providers0% | 0% | 0% | 36% | 63%
builder0% | 0% | 0% | 100% | 0%
labapp0% | 0% | 0% | 53% | 46%
pkg0% | 0% | 0% | 0% | 100%
printer0% | 0% | 0% | 0% | 100%
nodes0% | 0% | 0% | 0% | 100%
scenarios0% | 0% | 0% | 0% | 100%
uploaders0% | 0% | 0% | 0% | 100%
daemon0% | 0% | 0% | 0% | 100%
cue0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
downloaders0% | 0% | 0% | 0% | 100%
experiments0% | 0% | 0% | 0% | 100%
dag0% | 0% | 0% | 0% | 100%
reports0% | 0% | 0% | 0% | 100%
actions0% | 0% | 0% | 0% | 100%
errdefs0% | 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
benchmark.go
in metadata
408 12 88 22 17
scenario.go
in metadata
340 12 72 21 12
cluster.go
in metadata
345 13 71 21 11
node.go
in metadata
310 11 67 22 11
query.go
in query
240 16 63 26 9
experiment.go
in metadata
276 14 57 21 9
oci.go
in transformers/oci
283 9 48 17 10
helpers.go
in metadata
201 12 48 24 11
peer.go
in peer
286 14 45 16 10
cluster.go
in labd/controlapi
215 9 44 20 13
node.go
in cmd/labctl/command
262 5 42 16 17
supervisor.go
in labagent/supervisor
226 10 40 18 8
router.go
in labd/routers/benchmarkrouter
225 9 39 17 19
router.go
in labd/routers/experimentrouter
238 8 38 16 17
benchmark.go
in cmd/labctl/command
226 6 36 16 8
experiment.go
in cmd/labctl/command
228 5 34 15 12
builder.go
in builder
172 8 34 20 10
provider.go
in providers/terraform
208 6 32 15 10
benchmark.go
in labd/controlapi
156 9 31 20 7
scenario.go
in cmd/labctl/command
193 5 29 15 7
cluster.go
in cmd/labctl/command
214 5 29 14 7
router.go
in labapp/approuter
150 10 28 19 7
router.go
in labd/routers/noderouter
125 7 27 22 11
build.go
in metadata
135 6 27 20 5
experiment.go
in labd/controlapi
134 8 26 19 7
scenario.go
in labd/controlapi
131 8 25 19 7
buckets.go
in metadata
122 20 25 20 4
plan.go
in scenarios
123 2 24 20 19
run.go
in scenarios
146 5 24 16 8
build.go
in cmd/labctl/command
138 4 23 17 7
libp2p.go
in peer
120 5 23 19 9
common.go
in cmd/labctl/command
121 6 22 18 11
provider.go
in providers/inmemory
150 5 22 15 7
p2plab_instance.go
in cue/parser
96 5 21 22 12
router.go
in labd/routers/clusterrouter
108 8 21 19 6
router.go
in labd/routers/scenariorouter
108 8 21 19 6
table.go
in printer
107 4 20 19 7
node.go
in labd/controlapi
104 7 20 19 7
connect.go
in nodes
101 1 19 19 19
request.go
in pkg/httputil
92 4 19 21 9
daemon.go
in daemon
109 6 18 17 7
main.go
in cmd/ociget
93 3 17 18 13
terraform.go
in providers/terraform
121 7 17 14 7
report.go
in printer
151 5 17 11 7
debug.go
in cmd/labctl/command
127 3 16 13 8
helpers.go
in labd/routers/helpers
103 3 16 16 8
labd.go
in labd
125 3 16 13 10
metadata.go
in transformers/oci
81 3 16 20 7
update.go
in nodes
107 3 15 14 7
router.go
in labd/routers/buildrouter
83 6 15 18 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...