aws-samples / amazon-ecs-cicd-cdk
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 8 units with 493 lines of code in units (82.0% of code).
    • 1 very long units (156 lines of code)
    • 3 long units (272 lines of code)
    • 2 medium size units (50 lines of code)
    • 0 small units (0 lines of code)
    • 2 very small units (15 lines of code)
31% | 55% | 10% | 0% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java60% | 37% | 0% | 0% | 2%
py0% | 74% | 21% | 0% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
java/com/aws/pattern/cicd100% | 0% | 0% | 0% | 0%
resources/cdk_custom_resources0% | 74% | 21% | 0% | 3%
java/com/aws/pattern/infrastructure0% | 100% | 0% | 0% | 0%
java/com/aws/pattern0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 8 longest units
Unit# linesMcCabe index# params
public CicdBlueGreenStack()
in src/main/java/com/aws/pattern/cicd/CicdBlueGreenStack.java
156 1 4
public EcsInfrastructureStack()
in src/main/java/com/aws/pattern/infrastructure/EcsInfrastructureStack.java
98 1 3
def update_deployment_group()
in src/main/resources/cdk_custom_resources/create_deployment_group.py
88 2 2
def create_deployment_group()
in src/main/resources/cdk_custom_resources/create_deployment_group.py
86 2 2
def send()
in src/main/resources/cdk_custom_resources/create_deployment_group.py
26 3 6
def delete_deployment_group()
in src/main/resources/cdk_custom_resources/create_deployment_group.py
24 2 2
def handler()
in src/main/resources/cdk_custom_resources/create_deployment_group.py
9 4 2
public static void main()
in src/main/java/com/aws/pattern/EcsCicdCdkApp.java
6 1 1