aws-samples / multiarch-eks-springboot-deployment-pipeline-with-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 12 units with 233 lines of code in units (47.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (63 lines of code)
    • 2 medium size units (60 lines of code)
    • 6 small units (94 lines of code)
    • 3 very small units (16 lines of code)
0% | 27% | 25% | 40% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 33% | 19% | 43% | 3%
java0% | 0% | 48% | 29% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cdk/pipeline0% | 68% | 0% | 31% | 0%
cdk/backend0% | 0% | 39% | 54% | 6%
springbootsample/src/main/java/andrew/ren/springbootsample0% | 0% | 48% | 29% | 21%
Alternative Visuals
Longest Units
Top 12 longest units
Unit# linesMcCabe index# params
def __init__()
in cdk/pipeline/pipeline_stack.py
63 1 7
def add_service_account()
in cdk/backend/backend_stack.py
37 3 4
private String rdsTest()
in springbootsample/src/main/java/andrew/ren/springbootsample/SampleController.java
23 2 0
def create_eks()
in cdk/backend/backend_stack.py
20 1 2
def create_redis()
in cdk/backend/backend_stack.py
18 1 3
def get_build_env_vars()
in cdk/pipeline/pipeline_stack.py
17 1 2
private String jedisTest()
in springbootsample/src/main/java/andrew/ren/springbootsample/SampleController.java
14 2 0
def create_rds()
in cdk/backend/backend_stack.py
13 1 3
def add_role_access_to_build()
in cdk/pipeline/pipeline_stack.py
12 1 2
public String home()
in springbootsample/src/main/java/andrew/ren/springbootsample/SampleController.java
7 1 0
def __init__()
in cdk/backend/backend_stack.py
6 1 4
public static void main()
in springbootsample/src/main/java/andrew/ren/springbootsample/SampleApplication.java
3 1 1