awslabs / goformation
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,778 units with 82,351 lines of code in units (15.5% of code).
    • 1 very long units (889 lines of code)
    • 4 long units (265 lines of code)
    • 912 medium size units (33,489 lines of code)
    • 930 small units (18,310 lines of code)
    • 5,931 very small units (29,398 lines of code)
1% | <1% | 40% | 22% | 35%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go1% | <1% | 40% | 22% | 35%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cloudformation4% | 0% | <1% | <1% | 93%
generate0% | 30% | 43% | 12% | 13%
intrinsics0% | 11% | 37% | 34% | 16%
cloudformation/ec20% | 0% | 57% | 30% | 12%
cloudformation/sagemaker0% | 0% | 48% | 26% | 24%
cloudformation/iot0% | 0% | 53% | 28% | 18%
cloudformation/pinpoint0% | 0% | 55% | 29% | 15%
cloudformation/apigateway0% | 0% | 58% | 31% | 9%
cloudformation/glue0% | 0% | 52% | 28% | 19%
cloudformation/greengrass0% | 0% | 53% | 28% | 17%
cloudformation/servicecatalog0% | 0% | 60% | 32% | 6%
cloudformation/cloudformation0% | 0% | 62% | 29% | 7%
cloudformation/apigatewayv20% | 0% | 57% | 31% | 10%
cloudformation/rds0% | 0% | 59% | 31% | 8%
cloudformation/iam0% | 0% | 60% | 32% | 6%
cloudformation/cognito0% | 0% | 53% | 28% | 17%
cloudformation/appstream0% | 0% | 58% | 31% | 10%
cloudformation/wafregional0% | 0% | 57% | 31% | 10%
cloudformation/serverless0% | 0% | 32% | 41% | 26%
cloudformation/cloudfront0% | 0% | 47% | 25% | 26%
cloudformation/config0% | 0% | 56% | 30% | 12%
cloudformation/route53resolver0% | 0% | 60% | 32% | 6%
cloudformation/lambda0% | 0% | 58% | 26% | 15%
cloudformation/appsync0% | 0% | 54% | 29% | 16%
cloudformation/iotwireless0% | 0% | 55% | 30% | 14%
cloudformation/elasticache0% | 0% | 56% | 30% | 13%
cloudformation/datasync0% | 0% | 58% | 31% | 10%
cloudformation/redshift0% | 0% | 59% | 31% | 9%
cloudformation/ssm0% | 0% | 53% | 28% | 17%
cloudformation/gamelift0% | 0% | 54% | 29% | 16%
cloudformation/lightsail0% | 0% | 57% | 30% | 12%
cloudformation/appmesh0% | 0% | 32% | 17% | 50%
cloudformation/ecs0% | 0% | 44% | 23% | 31%
cloudformation/emr0% | 0% | 45% | 24% | 30%
cloudformation/iotsitewise0% | 0% | 52% | 28% | 19%
cloudformation/imagebuilder0% | 0% | 54% | 29% | 16%
cloudformation/opsworks0% | 0% | 54% | 29% | 15%
cloudformation/ses0% | 0% | 54% | 29% | 15%
cloudformation/waf0% | 0% | 56% | 30% | 12%
cloudformation/networkmanager0% | 0% | 60% | 32% | 6%
cloudformation/logs0% | 0% | 61% | 33% | 5%
cloudformation/autoscaling0% | 0% | 53% | 21% | 24%
cloudformation/wafv20% | 0% | 28% | 15% | 55%
cloudformation/quicksight0% | 0% | 32% | 17% | 49%
cloudformation/s30% | 0% | 38% | 20% | 40%
cloudformation/databrew0% | 0% | 43% | 23% | 32%
cloudformation/events0% | 0% | 52% | 28% | 19%
cloudformation/dms0% | 0% | 54% | 29% | 16%
cloudformation/cloudwatch0% | 0% | 54% | 29% | 15%
cloudformation/route530% | 0% | 56% | 30% | 13%
cloudformation/frauddetector0% | 0% | 56% | 30% | 12%
cloudformation/connect0% | 0% | 57% | 31% | 10%
cloudformation/appconfig0% | 0% | 58% | 31% | 10%
cloudformation/robomaker0% | 0% | 58% | 31% | 9%
cloudformation/guardduty0% | 0% | 59% | 32% | 8%
cloudformation/location0% | 0% | 60% | 32% | 6%
cloudformation/mediapackage0% | 0% | 46% | 25% | 28%
cloudformation/elasticloadbalancingv20% | 0% | 47% | 25% | 27%
cloudformation/backup0% | 0% | 55% | 30% | 14%
cloudformation/servicediscovery0% | 0% | 56% | 30% | 13%
cloudformation/mediaconnect0% | 0% | 57% | 31% | 11%
cloudformation/memorydb0% | 0% | 61% | 33% | 5%
cloudformation/neptune0% | 0% | 61% | 33% | 5%
cloudformation/lex0% | 0% | 36% | 19% | 44%
cloudformation/networkfirewall0% | 0% | 37% | 20% | 42%
cloudformation/iotanalytics0% | 0% | 37% | 20% | 42%
cloudformation/kinesisanalyticsv20% | 0% | 38% | 20% | 40%
cloudformation/acmpca0% | 0% | 45% | 24% | 29%
cloudformation/batch0% | 0% | 46% | 24% | 28%
cloudformation/pinpointemail0% | 0% | 52% | 28% | 19%
cloudformation/eks0% | 0% | 52% | 28% | 19%
cloudformation/nimblestudio0% | 0% | 53% | 28% | 17%
cloudformation/evidently0% | 0% | 53% | 28% | 17%
cloudformation/elasticbeanstalk0% | 0% | 55% | 29% | 14%
cloudformation/athena0% | 0% | 56% | 30% | 13%
cloudformation/ecr0% | 0% | 56% | 30% | 12%
cloudformation/s3outposts0% | 0% | 58% | 31% | 10%
cloudformation/route53recoveryreadiness0% | 0% | 58% | 31% | 10%
cloudformation/secretsmanager0% | 0% | 58% | 31% | 9%
cloudformation/route53recoverycontrol0% | 0% | 58% | 31% | 9%
cloudformation/refactorspaces0% | 0% | 58% | 31% | 9%
cloudformation/eventschemas0% | 0% | 59% | 32% | 8%
cloudformation/ivs0% | 0% | 60% | 32% | 7%
cloudformation/servicecatalogappregistry0% | 0% | 60% | 32% | 6%
cloudformation/docdb0% | 0% | 61% | 33% | 5%
cloudformation/medialive0% | 0% | 17% | 9% | 73%
cloudformation/kendra0% | 0% | 27% | 14% | 57%
cloudformation/codedeploy0% | 0% | 42% | 22% | 34%
cloudformation/kinesisanalytics0% | 0% | 43% | 23% | 32%
cloudformation/codebuild0% | 0% | 45% | 24% | 30%
cloudformation/groundstation0% | 0% | 46% | 25% | 28%
cloudformation/customerprofiles0% | 0% | 46% | 25% | 27%
cloudformation/codepipeline0% | 0% | 49% | 26% | 24%
cloudformation/amazonmq0% | 0% | 51% | 27% | 20%
cloudformation/transfer0% | 0% | 52% | 28% | 19%
cloudformation/timestream0% | 0% | 52% | 28% | 19%
cloudformation/lakeformation0% | 0% | 52% | 28% | 18%
cloudformation/efs0% | 0% | 55% | 29% | 14%
cloudformation/amplify0% | 0% | 55% | 29% | 14%
cloudformation/wisdom0% | 0% | 56% | 30% | 13%
cloudformation/globalaccelerator0% | 0% | 58% | 31% | 9%
cloudformation/macie0% | 0% | 58% | 31% | 9%
cloudformation/sso0% | 0% | 58% | 31% | 9%
cloudformation/iot1click0% | 0% | 59% | 32% | 8%
cloudformation/mediaconvert0% | 0% | 59% | 32% | 8%
cloudformation/panorama0% | 0% | 59% | 32% | 8%
cloudformation/sns0% | 0% | 60% | 32% | 6%
cloudformation/ce0% | 0% | 60% | 32% | 6%
cloudformation/dax0% | 0% | 60% | 32% | 6%
cloudformation/kms0% | 0% | 61% | 33% | 5%
cloudformation/inspector0% | 0% | 61% | 33% | 5%
cloudformation/appflow0% | 0% | 21% | 11% | 66%
cloudformation/dynamodb0% | 0% | 35% | 19% | 44%
cloudformation/iotevents0% | 0% | 36% | 19% | 43%
cloudformation/licensemanager0% | 0% | 39% | 21% | 38%
cloudformation/lookoutmetrics0% | 0% | 41% | 22% | 35%
cloudformation/amplifyuibuilder0% | 0% | 43% | 23% | 33%
cloudformation/budgets0% | 0% | 46% | 25% | 28%
cloudformation/stepfunctions0% | 0% | 50% | 27% | 22%
cloudformation/managedblockchain0% | 0% | 50% | 27% | 22%
cloudformation/applicationautoscaling0% | 0% | 50% | 27% | 22%
cloudformation/ssmincidents0% | 0% | 51% | 27% | 20%
cloudformation/cassandra0% | 0% | 54% | 29% | 15%
cloudformation/xray0% | 0% | 56% | 30% | 13%
cloudformation/devopsguru0% | 0% | 56% | 30% | 13%
cloudformation/ssmcontacts0% | 0% | 56% | 30% | 13%
cloudformation/fms0% | 0% | 57% | 31% | 11%
cloudformation/resiliencehub0% | 0% | 57% | 31% | 11%
cloudformation/workspaces0% | 0% | 58% | 31% | 9%
cloudformation/kinesis0% | 0% | 58% | 31% | 9%
cloudformation/s3objectlambda0% | 0% | 58% | 31% | 9%
cloudformation/directoryservice0% | 0% | 58% | 31% | 9%
cloudformation/certificatemanager0% | 0% | 58% | 31% | 9%
cloudformation/qldb0% | 0% | 60% | 32% | 7%
cloudformation/signer0% | 0% | 60% | 32% | 7%
cloudformation/kinesisvideo0% | 0% | 61% | 33% | 5%
cloudformation/sqs0% | 0% | 61% | 33% | 5%
cloudformation/forecast0% | 0% | 61% | 33% | 5%
cloudformation/aps0% | 0% | 61% | 33% | 5%
cloudformation/codeartifact0% | 0% | 61% | 33% | 5%
cloudformation/detective0% | 0% | 61% | 33% | 5%
cloudformation/kinesisfirehose0% | 0% | 20% | 11% | 67%
cloudformation/msk0% | 0% | 28% | 15% | 56%
cloudformation/dlm0% | 0% | 34% | 18% | 47%
cloudformation/elasticsearch0% | 0% | 37% | 20% | 42%
cloudformation/applicationinsights0% | 0% | 37% | 20% | 42%
cloudformation/opensearchservice0% | 0% | 38% | 20% | 40%
cloudformation/apprunner0% | 0% | 38% | 20% | 40%
cloudformation/auditmanager0% | 0% | 39% | 21% | 38%
cloudformation/fsx0% | 0% | 39% | 21% | 38%
cloudformation/fis0% | 0% | 39% | 21% | 38%
cloudformation/autoscalingplans0% | 0% | 42% | 22% | 34%
cloudformation/greengrassv20% | 0% | 42% | 22% | 34%
cloudformation/mwaa0% | 0% | 42% | 22% | 34%
cloudformation/synthetics0% | 0% | 44% | 23% | 32%
cloudformation/elasticloadbalancing0% | 0% | 44% | 23% | 32%
cloudformation/inspectorv20% | 0% | 45% | 24% | 29%
cloudformation/datapipeline0% | 0% | 47% | 25% | 26%
cloudformation/resourcegroups0% | 0% | 49% | 26% | 24%
cloudformation/healthlake0% | 0% | 53% | 28% | 17%
cloudformation/emrcontainers0% | 0% | 53% | 28% | 17%
cloudformation/codecommit0% | 0% | 53% | 28% | 17%
cloudformation/mediastore0% | 0% | 53% | 28% | 17%
cloudformation/cloudtrail0% | 0% | 53% | 28% | 17%
cloudformation/appintegrations0% | 0% | 53% | 28% | 17%
cloudformation/ask0% | 0% | 53% | 28% | 17%
cloudformation/accessanalyzer0% | 0% | 56% | 30% | 13%
cloudformation/finspace0% | 0% | 56% | 30% | 13%
cloudformation/codestar0% | 0% | 56% | 30% | 13%
cloudformation/codestarnotifications0% | 0% | 58% | 31% | 9%
cloudformation/codeguruprofiler0% | 0% | 58% | 31% | 9%
cloudformation/rum0% | 0% | 58% | 31% | 9%
cloudformation/cloud90% | 0% | 58% | 31% | 9%
cloudformation/opsworkscm0% | 0% | 58% | 31% | 9%
cloudformation/iotthingsgraph0% | 0% | 58% | 31% | 9%
cloudformation/lookoutvision0% | 0% | 61% | 33% | 5%
cloudformation/codestarconnections0% | 0% | 61% | 33% | 5%
cloudformation/sdb0% | 0% | 61% | 33% | 5%
cloudformation/cdk0% | 0% | 61% | 33% | 5%
cloudformation/rekognition0% | 0% | 61% | 33% | 5%
cloudformation/iotfleethub0% | 0% | 61% | 33% | 5%
cloudformation/securityhub0% | 0% | 61% | 33% | 5%
cloudformation/chatbot0% | 0% | 61% | 33% | 5%
cloudformation/iotcoredeviceadvisor0% | 0% | 61% | 33% | 5%
cloudformation/lookoutequipment0% | 0% | 61% | 33% | 5%
cloudformation/ram0% | 0% | 61% | 33% | 5%
cloudformation/codegurureviewer0% | 0% | 61% | 33% | 5%
cloudformation/cur0% | 0% | 61% | 33% | 5%
example/go-to-yaml0% | 0% | 100% | 0% | 0%
cloudformation/utils0% | 0% | 0% | 73% | 26%
example/yaml-to-go0% | 0% | 0% | 100% | 0%
ROOT0% | 0% | 0% | 0% | 100%
cloudformation/tags0% | 0% | 0% | 0% | 100%
cloudformation/global0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func AllResources()
in cloudformation/all.go
889 1 0
func()
in generate/generate.go
90 16 1
func()
in generate/generate.go
69 11 1
func()
in generate/generate.go
53 13 1
func search()
in intrinsics/intrinsics.go
53 19 3
func generatePolymorphicProperty()
in generate/generate.go
49 6 3
func()
in cloudformation/autoscaling/aws-autoscaling-autoscalinggroup.go
45 10 1
func()
in cloudformation/serverless/function_properties.go
44 14 1
func()
in cloudformation/cloudformation/aws-cloudformation-waitcondition.go
41 9 1
func()
in cloudformation/lambda/aws-lambda-alias.go
41 9 1
func()
in cloudformation/ec2/aws-ec2-instance.go
41 9 1
func()
in generate/generate.go
38 11 1
func()
in cloudformation/custom_resource.go
38 8 1
func()
in cloudformation/synthetics/aws-synthetics-canary.go
37 8 1
func()
in cloudformation/codebuild/aws-codebuild-sourcecredential.go
37 8 1
func()
in cloudformation/codebuild/aws-codebuild-reportgroup.go
37 8 1
func()
in cloudformation/codebuild/aws-codebuild-project.go
37 8 1
func()
in cloudformation/kinesisvideo/aws-kinesisvideo-stream.go
37 8 1
func()
in cloudformation/kinesisvideo/aws-kinesisvideo-signalingchannel.go
37 8 1
func()
in cloudformation/elasticsearch/aws-elasticsearch-domain.go
37 8 1