aws / amazon-ecs-cli
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 7,344 units with 52,215 lines of code in units (86.9% of code).
    • 4 very long units (473 lines of code)
    • 13 long units (900 lines of code)
    • 132 medium size units (3,773 lines of code)
    • 1,161 small units (13,564 lines of code)
    • 6,034 very small units (33,505 lines of code)
<1% | 1% | 7% | 25% | 64%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go<1% | 1% | 7% | 25% | 64%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ecs-cli/modules/cli5% | 8% | 33% | 29% | 22%
ecs-cli/modules/utils11% | 22% | 18% | 29% | 17%
ecs-cli/modules/commands0% | 6% | 34% | 26% | 32%
ecs-cli/modules/clients0% | 0% | 1% | 25% | 73%
ecs-cli/integ/cmd0% | 0% | 67% | 14% | 18%
ecs-cli/modules/config0% | 0% | 33% | 41% | 24%
ecs-cli/integ/ecs0% | 0% | 87% | 0% | 12%
ecs-cli0% | 0% | 72% | 27% | 0%
ecs-cli/integ0% | 0% | 0% | 70% | 30%
ecs-cli/integ/cfn0% | 0% | 0% | 52% | 47%
ecs-cli/integ/stdout0% | 0% | 0% | 0% | 100%
ecs-cli/modules/version0% | 0% | 0% | 0% | 100%
ecs-cli/modules0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func createCluster()
in ecs-cli/modules/cli/cluster/cluster_app.go
137 40 3
func reconcileContainerDef()
in ecs-cli/modules/utils/compose/reconcile_container_def.go
117 28 3
func convertToContainerConfig()
in ecs-cli/modules/cli/compose/project/project_parseV3.go
110 22 2
func TestInfo()
in ecs-cli/modules/cli/compose/entity/entity_test_helper.go
109 8 5
func()
in ecs-cli/modules/cli/compose/entity/service/service.go
87 25 1
func mergeVolumesWithoutHost()
in ecs-cli/modules/utils/compose/convert_task_definition.go
84 23 2
func convertV1V2ToContainerConfig()
in ecs-cli/modules/cli/compose/project/project_parseV1V2.go
80 12 4
func ConvertToTaskDefinition()
in ecs-cli/modules/utils/compose/convert_task_definition.go
78 16 1
func clusterUpFlags()
in ecs-cli/modules/commands/cluster/cluster_command.go
77 1 0
func Up()
in ecs-cli/modules/cli/regcreds/regcreds_app.go
71 14 1
func()
in ecs-cli/modules/cli/compose/entity/task/task.go
70 19 1
func()
in ecs-cli/modules/cli/compose/entity/service/service.go
63 24 1
func ParseLoadBalancers()
in ecs-cli/modules/utils/utils.go
61 15 1
func Migrate()
in ecs-cli/modules/cli/configure/configure.go
60 15 1
func pushImage()
in ecs-cli/modules/cli/image/image_app.go
58 14 6
func convertToComposeService()
in ecs-cli/modules/cli/local/converter/converter.go
57 1 2
func()
in ecs-cli/modules/cli/compose/entity/task/task.go
54 13 1
func serviceDiscoveryFlags()
in ecs-cli/modules/commands/compose/service/compose_service_command.go
48 1 0
func createComposeServices()
in ecs-cli/modules/cli/local/converter/converter.go
47 12 2
func validateCredsInput()
in ecs-cli/modules/cli/regcreds/regcreds_app.go
46 16 2