aws / amazon-ecs-init
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 303 units with 2,552 lines of code in units (58.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (62 lines of code)
    • 18 medium size units (568 lines of code)
    • 44 small units (655 lines of code)
    • 240 very small units (1,267 lines of code)
0% | 2% | 22% | 25% | 49%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 2% | 22% | 25% | 49%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ecs-init/volumes0% | 12% | 19% | 34% | 32%
ecs-init/docker0% | 0% | 23% | 31% | 44%
ecs-init/engine0% | 0% | 25% | 12% | 62%
ecs-init0% | 0% | 82% | 0% | 17%
ecs-init/config0% | 0% | 28% | 12% | 59%
scripts/changelog0% | 0% | 28% | 64% | 7%
ecs-init/gpu0% | 0% | 15% | 15% | 69%
ecs-init/exec0% | 0% | 6% | 24% | 69%
ecs-init/backoff0% | 0% | 0% | 0% | 100%
ecs-init/version0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in ecs-init/volumes/ecs_volume_plugin.go
62 12 1
func main()
in scripts/changelog/changelog.go
45 6 0
func()
in ecs-init/engine/engine.go
44 10 1
func main()
in ecs-init/ecs-init.go
39 9 0
func()
in ecs-init/engine/engine.go
39 11 1
func()
in ecs-init/volumes/ecs_volume_plugin.go
37 7 1
func()
in ecs-init/docker/docker.go
36 6 1
func()
in ecs-init/volumes/ecs_volume_plugin.go
33 6 1
func()
in ecs-init/docker/docker.go
31 7 1
func AgentDockerLogDriverConfiguration()
in ecs-init/config/common.go
30 7 0
func()
in ecs-init/gpu/nvidia_gpu_manager.go
30 7 1
func createHostConfig()
in ecs-init/docker/docker_config.go
29 3 1
func actions()
in ecs-init/ecs-init.go
28 1 1
func saveState()
in ecs-init/volumes/state_manager.go
27 7 1
func newDockerClient()
in ecs-init/docker/dependencies.go
27 8 2
func New()
in ecs-init/engine/engine.go
26 5 0
func Logger()
in ecs-init/config/logger.go
24 2 0
func()
in ecs-init/exec/iptables/iptables.go
22 6 1
func()
in ecs-init/docker/docker.go
21 5 1
func()
in ecs-init/gpu/nvidia_gpu_manager.go
20 5 1