awslabs / amazon-ecs-local-container-endpoints
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 1,186 units with 8,043 lines of code in units (95.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (87 lines of code)
    • 11 medium size units (319 lines of code)
    • 192 small units (2,210 lines of code)
    • 982 very small units (5,427 lines of code)
0% | 1% | 3% | 27% | 67%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 100% | 0% | 0% | 0%
go0% | 0% | 4% | 27% | 68%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
infra0% | 100% | 0% | 0% | 0%
local-container-endpoints/handlers0% | 0% | 39% | 45% | 15%
local-container-endpoints/testingutils0% | 0% | 53% | 32% | 13%
ROOT0% | 0% | 100% | 0% | 0%
local-container-endpoints/clients/iam0% | 0% | 0% | 25% | 74%
local-container-endpoints/clients/sts0% | 0% | 0% | 28% | 71%
local-container-endpoints/metadata0% | 0% | 0% | 75% | 24%
local-container-endpoints/clients/docker0% | 0% | 0% | 44% | 55%
local-container-endpoints/utils0% | 0% | 0% | 50% | 50%
local-container-endpoints/clients/useragent0% | 0% | 0% | 0% | 100%
local-container-endpoints/version0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in infra/pipeline.ts
87 5 3
func NewCredentialService()
in local-container-endpoints/handlers/credentials_handler.go
38 8 0
func()
in local-container-endpoints/handlers/credentials_handler.go
35 7 1
func()
in local-container-endpoints/handlers/metadata.go
32 7 1
func filterContainersByMyNetworks()
in local-container-endpoints/handlers/metadata.go
32 13 3
func BaseMetadataContainer()
in local-container-endpoints/testingutils/metadata_container.go
32 1 2
func BaseDockerContainer()
in local-container-endpoints/testingutils/docker_container.go
29 1 2
func()
in local-container-endpoints/handlers/metadata.go
28 7 1
func main()
in main.go
27 4 0
23 5 1
func()
in local-container-endpoints/handlers/metadata.go
22 4 1
func getSharedTokenExpiration()
in local-container-endpoints/handlers/credentials_handler.go
21 4 0
func()
in local-container-endpoints/handlers/credentials_handler.go
20 3 1
func findContainer()
in local-container-endpoints/handlers/metadata.go
20 6 3
func convertNetworks()
in local-container-endpoints/metadata/metadata.go
20 4 1
func()
in local-container-endpoints/handlers/credentials_handler.go
19 3 1
func()
in local-container-endpoints/handlers/metadata.go
19 4 1
func()
in local-container-endpoints/handlers/metadata_handler.go
18 1 1
func()
in local-container-endpoints/handlers/credentials_handler.go
18 2 1
func filterContainersByIdentifier()
in local-container-endpoints/handlers/metadata.go
18 6 2