aws-samples / aws-quarkus-demo
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 64 units with 556 lines of code in units (47.5% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (178 lines of code)
    • 3 medium size units (103 lines of code)
    • 5 small units (63 lines of code)
    • 53 very small units (212 lines of code)
0% | 32% | 18% | 11% | 38%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 48% | 43% | 7% | 0%
java0% | 19% | 0% | 14% | 66%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
fargate/eks_cdk/lib0% | 34% | 56% | 9% | 0%
lambda/src/main/java/com/amazon/example0% | 95% | 0% | 0% | 4%
fargate/ecs_cdk/lib0% | 100% | 0% | 0% | 0%
fargate/src/main/java/com/amazon/example/service0% | 0% | 0% | 24% | 75%
lambda/src/main/java/com/amazon/example/service0% | 0% | 0% | 24% | 75%
fargate/src/main/java/com/amazon/example/pojo0% | 0% | 0% | 16% | 83%
lambda/src/main/java/com/amazon/example/pojo0% | 0% | 0% | 16% | 83%
fargate/src/main/java/com/amazon/example/resource0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in fargate/eks_cdk/lib/ALBIngressController.ts
63 1 3
public APIGatewayProxyResponseEvent handleRequest()
in lambda/src/main/java/com/amazon/example/ProcessingLambda.java
63 13 2
constructor()
in fargate/ecs_cdk/lib/ecs_cdk-stack.ts
52 1 3
constructor()
in fargate/eks_cdk/lib/eks_cdk-stack.ts
44 1 3
private static getQuarkusAlbIngressK8sDefinition()
in fargate/eks_cdk/lib/eks_cdk-stack.ts
32 1 1
private static getQuarkusStsDeploymentK8sDefinition()
in fargate/eks_cdk/lib/eks_cdk-stack.ts
27 1 2
private static getQuarkusServiceK8sDefinition()
in fargate/eks_cdk/lib/eks_cdk-stack.ts
17 1 1
protected PutItemRequest putRequest()
in fargate/src/main/java/com/amazon/example/service/AbstractService.java
12 1 1
protected PutItemRequest putRequest()
in lambda/src/main/java/com/amazon/example/service/AbstractService.java
12 1 1
public static User from()
in fargate/src/main/java/com/amazon/example/pojo/User.java
11 3 1
public static User from()
in lambda/src/main/java/com/amazon/example/pojo/User.java
11 3 1
protected GetItemRequest getRequest()
in fargate/src/main/java/com/amazon/example/service/AbstractService.java
9 1 1
public String toString()
in fargate/src/main/java/com/amazon/example/pojo/User.java
9 1 0
protected GetItemRequest getRequest()
in lambda/src/main/java/com/amazon/example/service/AbstractService.java
9 1 1
public String toString()
in lambda/src/main/java/com/amazon/example/pojo/User.java
9 1 0
public User()
in fargate/src/main/java/com/amazon/example/pojo/User.java
7 1 5
public User()
in lambda/src/main/java/com/amazon/example/pojo/User.java
7 1 5
public User createUser()
in fargate/src/main/java/com/amazon/example/resource/UserResource.java
6 1 1
public boolean equals()
in fargate/src/main/java/com/amazon/example/pojo/User.java
6 4 1
public boolean equals()
in lambda/src/main/java/com/amazon/example/pojo/User.java
6 4 1