File Complexity Overall
  • There are 94 files with units, with 9,128 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 1 complex files (McCabe index sum 126-250; 1,053 lines of code)
    • 2 medium complex files (McCabe index sum 51-125; 1,351 lines of code)
    • 2 slightly complex files (McCabe index sum 26-50; 603 lines of code)
    • 89 simple files (McCabe index sum 1-25; 6,121 lines of code)
  • 25 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 11% | 14% | 6% | 67%
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
swift0% | 12% | 15% | 7% | 64%
go0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
Sources0% | 12% | 15% | 7% | 64%
benchmark0% | 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
Run.swift
in Sources/tart/Commands
1053 21 136 13 36
VMStorageOCI.swift
in Sources/tart
624 27 88 14 16
ReferenceParser.swift
in Sources/tart/OCI/Reference/Generated
727 64 84 12 2
VMDirectory.swift
in Sources/tart
373 21 36 10 5
Manifest.swift
in Sources/tart/OCI
230 17 27 12 4
stackedoci.go
in benchmark/internal/command/stackedoci
135 5 21 16 15
Darwin.swift
in Sources/tart/Platform
110 12 21 19 3
Clone.swift
in Sources/tart/Commands
127 2 19 15 16
VMConfig.swift
in Sources/tart
164 9 18 11 4
ContentStore.swift
in Sources/tart
127 13 17 13 3
Push.swift
in Sources/tart/Commands
111 4 17 15 7
tart.go
in benchmark/internal/executor/tart
128 4 16 13 9
fio.go
in benchmark/internal/command/fio
105 2 15 14 14
VMDirectory+OCI.swift
in Sources/tart
286 2 15 5 14
xcode.go
in benchmark/internal/command/xcode
83 2 13 16 12
VMStorageLocal.swift
in Sources/tart
78 9 12 15 4
Prune.swift
in Sources/tart/Commands
146 2 12 8 6
KeychainCredentialsProvider.swift
in Sources/tart/Credentials
76 4 12 16 5
ControlSocket.swift
in Sources/tart
113 4 11 10 4
Registry.swift
in Sources/tart/OCI
353 6 11 3 4
Set.swift
in Sources/tart/Commands
90 1 11 12 11
Create.swift
in Sources/tart/Commands
66 2 11 17 6
DockerConfigCredentialsProvider.swift
in Sources/tart/Credentials
95 4 11 12 4
ARPCache.swift
in Sources/tart/MACAddressResolver
93 3 10 11 4
Linux.swift
in Sources/tart/Platform
38 7 10 26 2
RemoteName.swift
in Sources/tart/OCI
126 5 10 8 6
PIDLock.swift
in Sources/tart
43 6 10 23 4
Stop.swift
in Sources/tart/Commands
48 3 10 21 5
116 3 10 9 5
VM.swift
in Sources/tart
361 6 9 2 4
Login.swift
in Sources/tart/Commands
61 5 9 15 4
List.swift
in Sources/tart/Commands
79 2 9 11 7
FileLock.swift
in Sources/tart
37 5 8 22 4
Softnet.swift
in Sources/tart/Network
148 4 8 5 4
URL+Prunable.swift
in Sources/tart
36 6 8 22 2
Exec.swift
in Sources/tart/Commands
165 1 8 5 8
Platform.swift
in Sources/tart/Platform
14 7 7 50 1
ReferenceLexer.swift
in Sources/tart/OCI/Reference/Generated
70 7 7 10 1
DiskImageStack.swift
in Sources/tart
255 4 7 3 2
Format.swift
in Sources/tart/Formatter
41 2 7 17 4
output.go
in benchmark/internal/command/xcode
39 1 6 15 6
Bootptab.swift
in Sources/tart/MACAddressResolver
48 2 6 13 4
Fetcher.swift
in Sources/tart
69 3 6 9 3
Export.swift
in Sources/tart/Commands
33 2 6 18 5
Serial.swift
in Sources/tart
33 1 5 15 5
NetworkHost.swift
in Sources/tart/Network
49 4 5 10 2
ScreenSharingVNC.swift
in Sources/tart/VNC
19 3 5 26 3
FullFledgedVNC.swift
in Sources/tart/VNC
29 3 5 17 3
Config.swift
in Sources/tart
57 2 5 9 3
LocalLayerCache.swift
in Sources/tart
43 3 5 12 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...