cdklabs / cdk-cloudformation
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,023 units with 9,523 lines of code in units (63.4% of code).
    • 1 very long units (169 lines of code)
    • 7 long units (471 lines of code)
    • 26 medium size units (741 lines of code)
    • 67 small units (954 lines of code)
    • 922 very small units (7,188 lines of code)
1% | 4% | 7% | 10% | 75%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts1% | 4% | 7% | 9% | 75%
js0% | 0% | 0% | 100% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
projenrc38% | 32% | 11% | 14% | 1%
packages/@cdk-cloudformation/awsqs-checkpoint-cloudguardqs-module0% | 11% | 0% | 0% | 88%
packages/@cdk-cloudformation/awsqs-vpc-vpcqs-module0% | 7% | 4% | 0% | 87%
packages/@cdk-cloudformation/jfrog-artifactory-existingvpc-module0% | 8% | 3% | 0% | 87%
packages/@cdk-cloudformation/jfrog-artifactory-newvpc-module0% | 11% | 0% | 0% | 88%
packages/@cdk-cloudformation/splunk-enterprise-quickstart-module0% | 0% | 13% | 0% | 86%
packages/@cdk-cloudformation/jfrog-vpc-multiaz-module0% | 0% | 13% | 0% | 86%
packages/@cdk-cloudformation/tf-ad-user0% | 0% | 86% | 0% | 13%
packages/@cdk-cloudformation/jfrog-artifactory-ec2instance-module0% | 0% | 12% | 0% | 87%
packages/@cdk-cloudformation/jfrog-xray-ec2instance-module0% | 0% | 12% | 0% | 87%
packages/@cdk-cloudformation/tf-github-repository0% | 0% | 43% | 21% | 34%
packages/@cdk-cloudformation/tf-aws-s3bucketobject0% | 0% | 49% | 0% | 50%
packages/@cdk-cloudformation/tf-azuread-user0% | 0% | 72% | 27% | 0%
packages/@cdk-cloudformation/tf-aws-s3bucket0% | 0% | 10% | 19% | 69%
packages/@cdk-cloudformation/tf-azuread-application0% | 0% | 18% | 26% | 55%
packages/@cdk-cloudformation/jfrog-linux-bastion-module0% | 0% | 8% | 5% | 86%
packages/@cdk-cloudformation/awsqs-ec2-linuxbastionqs-module0% | 0% | 8% | 5% | 86%
packages/@cdk-cloudformation/jfrog-artifactory-core-module0% | 0% | 10% | 5% | 84%
packages/@cdk-cloudformation/mongodb-atlas-cluster0% | 0% | 20% | 29% | 50%
packages/@cdk-cloudformation/tf-google-storagebucket0% | 0% | 19% | 12% | 67%
packages/@cdk-cloudformation/datadog-monitors-monitor0% | 0% | 30% | 36% | 33%
packages/@cdk-cloudformation/spot-elastigroup-group0% | 0% | 6% | 34% | 59%
packages/@cdk-cloudformation/tf-digitalocean-droplet0% | 0% | 55% | 44% | 0%
packages/@cdk-cloudformation/awsqs-kubernetes-helm0% | 0% | 47% | 0% | 52%
packages/@cdk-cloudformation/datadog-monitors-downtime0% | 0% | 84% | 0% | 16%
packages/@cdk-cloudformation/logzio-awscostandusage-cur-module0% | 0% | 0% | 16% | 83%
packages/@cdk-cloudformation/tf-pagerduty-service0% | 0% | 0% | 34% | 65%
packages/@cdk-cloudformation/awsqs-eks-cluster0% | 0% | 0% | 32% | 67%
packages/@cdk-cloudformation/datadog-slos-slo0% | 0% | 0% | 50% | 49%
packages/@cdk-cloudformation/awsqs-iridium-cloudconnectqs-module0% | 0% | 0% | 18% | 81%
packages/@cdk-cloudformation/atlassian-opsgenie-integration0% | 0% | 0% | 54% | 45%
packages/@cdk-cloudformation/trendmicro-cloudonecontainer-helm0% | 0% | 0% | 58% | 41%
packages/@cdk-cloudformation/tf-cloudflare-record0% | 0% | 0% | 34% | 66%
packages/@cdk-cloudformation/tf-random-string0% | 0% | 0% | 53% | 46%
packages/@cdk-cloudformation/aqua-enterprise-kubeenforcer0% | 0% | 0% | 56% | 43%
packages/@cdk-cloudformation/gremlin-agent-helm0% | 0% | 0% | 56% | 43%
packages/@cdk-cloudformation/sysdig-helm-agent0% | 0% | 0% | 56% | 43%
packages/@cdk-cloudformation/aqua-enterprise-scanner0% | 0% | 0% | 56% | 43%
packages/@cdk-cloudformation/snyk-container-helm0% | 0% | 0% | 56% | 43%
packages/@cdk-cloudformation/aqua-enterprise-enforcer0% | 0% | 0% | 56% | 43%
packages/@cdk-cloudformation/aqua-enterprise-server0% | 0% | 0% | 56% | 43%
packages/@cdk-cloudformation/logzio-kinesisshipper-kinesisshipper-module0% | 0% | 0% | 11% | 88%
packages/@cdk-cloudformation/mongodb-atlas-databaseuser0% | 0% | 0% | 29% | 70%
registry0% | 0% | 0% | 100% | 0%
packages/@cdk-cloudformation/mongodb-atlas-networkpeering0% | 0% | 0% | 50% | 50%
packages/@cdk-cloudformation/logzio-autodeploymentlogzio-cloudwatch-module0% | 0% | 0% | 10% | 89%
packages/@cdk-cloudformation/stackery-open-bastion-module0% | 0% | 0% | 11% | 88%
packages/@cdk-cloudformation/datadog-integrations-aws0% | 0% | 0% | 72% | 27%
packages/@cdk-cloudformation/generic-database-schema0% | 0% | 0% | 16% | 83%
packages/@cdk-cloudformation/alexa-ask-skill0% | 0% | 0% | 26% | 73%
packages/@cdk-cloudformation/tf-aws-keypair0% | 0% | 0% | 30% | 69%
packages/@cdk-cloudformation/mongodb-atlas-projectipaccesslist0% | 0% | 0% | 32% | 67%
packages/@cdk-cloudformation/atlassian-opsgenie-team0% | 0% | 0% | 45% | 54%
packages/@cdk-cloudformation/awsqs-kubernetes-get0% | 0% | 0% | 64% | 35%
packages/@cdk-cloudformation/atlassian-opsgenie-user0% | 0% | 0% | 68% | 31%
packages/@cdk-cloudformation/fireeye-cloudintegrations-cloudwatch0% | 0% | 0% | 68% | 31%
packages/@cdk-cloudformation/logzio-myservice-myname-module0% | 0% | 0% | 0% | 100%
packages/@cdk-cloudformation/logzio-awssecurityhub-collector-module0% | 0% | 0% | 0% | 100%
packages/@cdk-cloudformation/symphonia-opensource-cloudformationartifactsbucket-module0% | 0% | 0% | 0% | 100%
packages/@cdk-cloudformation/mongodb-atlas-project0% | 0% | 0% | 0% | 100%
packages/@cdk-cloudformation/tf-random-uuid0% | 0% | 0% | 0% | 100%
packages/@cdk-cloudformation/tf-ad-computer0% | 0% | 0% | 0% | 100%
packages/@cdk-cloudformation/awsqs-kubernetes-resource0% | 0% | 0% | 0% | 100%
packages/@cdk-cloudformation/stocks-orders-marketorder0% | 0% | 0% | 0% | 100%
packages/@cdk-cloudformation/generic-transcribe-vocabulary0% | 0% | 0% | 0% | 100%
packages/@cdk-cloudformation/datadog-dashboards-dashboard0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in projenrc/type-package.ts
169 7 2
export function toJson_CfnVpcqsModulePropsResources()
in packages/@cdk-cloudformation/awsqs-vpc-vpcqs-module/src/index.ts
81 3 1
constructor()
in projenrc/readme.ts
79 11 2
export function toJson_CfnCloudGuardQsModulePropsParameters()
in packages/@cdk-cloudformation/awsqs-checkpoint-cloudguardqs-module/src/index.ts
78 3 1
export function toJson_CfnCloudGuardQsModulePropsResources()
in packages/@cdk-cloudformation/awsqs-checkpoint-cloudguardqs-module/src/index.ts
63 3 1
constructor()
in projenrc/update-registry.ts
62 1 1
export function toJson_CfnExistingVpcModulePropsParameters()
in packages/@cdk-cloudformation/jfrog-artifactory-existingvpc-module/src/index.ts
56 3 1
export function toJson_CfnNewVpcModulePropsParameters()
in packages/@cdk-cloudformation/jfrog-artifactory-newvpc-module/src/index.ts
52 3 1
export function toJson_CfnUserProps()
in packages/@cdk-cloudformation/tf-ad-user/src/index.ts
44 3 1
export function toJson_CfnEc2InstanceModulePropsParameters()
in packages/@cdk-cloudformation/jfrog-artifactory-ec2instance-module/src/index.ts
41 3 1
export function toJson_CfnVpcqsModulePropsParameters()
in packages/@cdk-cloudformation/awsqs-vpc-vpcqs-module/src/index.ts
41 3 1
export function toJson_CfnQuickStartModulePropsResources()
in packages/@cdk-cloudformation/splunk-enterprise-quickstart-module/src/index.ts
40 3 1
export function toJson_CfnEc2InstanceModulePropsParameters()
in packages/@cdk-cloudformation/jfrog-xray-ec2instance-module/src/index.ts
35 3 1
export function toJson_CfnQuickStartModulePropsParameters()
in packages/@cdk-cloudformation/splunk-enterprise-quickstart-module/src/index.ts
30 3 1
export function toJson_CfnS3BucketObjectProps()
in packages/@cdk-cloudformation/tf-aws-s3bucketobject/src/index.ts
30 3 1
export function toJson_CfnMultiAzModulePropsResources()
in packages/@cdk-cloudformation/jfrog-vpc-multiaz-module/src/index.ts
30 3 1
export function toJson_CfnRepositoryProps()
in packages/@cdk-cloudformation/tf-github-repository/src/index.ts
30 3 1
public preSynthesize()
in projenrc/type-package.ts
29 3 0
export function toJson_CfnUserProps()
in packages/@cdk-cloudformation/tf-azuread-user/src/index.ts
29 3 1
export function toJson_CfnBastionModulePropsParameters()
in packages/@cdk-cloudformation/jfrog-linux-bastion-module/src/index.ts
28 3 1