aws / aws-sam-cli-app-templates
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 622 units with 3,688 lines of code in units (33.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 22 medium size units (515 lines of code)
    • 66 small units (991 lines of code)
    • 534 very small units (2,182 lines of code)
0% | 0% | 13% | 26% | 59%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 32% | 24% | 43%
ts0% | 0% | 35% | 35% | 28%
cs0% | 0% | 8% | 38% | 53%
java0% | 0% | 0% | 26% | 73%
go0% | 0% | 0% | 49% | 50%
rb0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
python3.90% | 0% | 34% | 22% | 43%
python3.80% | 0% | 37% | 19% | 42%
python3.70% | 0% | 39% | 14% | 45%
python3.60% | 0% | 39% | 14% | 45%
nodejs12.x0% | 0% | 31% | 31% | 36%
dotnetcore3.10% | 0% | 10% | 31% | 57%
java80% | 0% | 0% | 23% | 76%
java110% | 0% | 0% | 23% | 76%
java8.al20% | 0% | 0% | 20% | 79%
python3.8-image0% | 0% | 0% | 71% | 28%
python3.9-image0% | 0% | 0% | 66% | 33%
java11-image0% | 0% | 0% | 75% | 25%
java8-image0% | 0% | 0% | 75% | 25%
java8.al2-image0% | 0% | 0% | 75% | 25%
go1.x0% | 0% | 0% | 34% | 65%
go1.x-image0% | 0% | 0% | 86% | 13%
dotnet5.0-image0% | 0% | 0% | 68% | 31%
dotnetcore3.1-image0% | 0% | 0% | 68% | 31%
ruby2.70% | 0% | 0% | 0% | 100%
nodejs14.x0% | 0% | 0% | 0% | 100%
python3.7-image0% | 0% | 0% | 0% | 100%
python3.6-image0% | 0% | 0% | 0% | 100%
ruby2.7-image0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def unmarshall()
in python3.7/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/marshaller.py
26 12 3
def unmarshall()
in python3.8/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/marshaller.py
26 12 3
def unmarshall()
in python3.6/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/marshaller.py
26 12 3
def unmarshall()
in python3.9/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/marshaller.py
26 12 3
async run()
in nodejs12.x/cookiecutter-typescript-app-template/{{cookiecutter.project_name}}/app/src/apps/post-app.ts
25 6 1
def __unmarshall_model()
in python3.7/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/marshaller.py
24 15 3
def __unmarshall_model()
in python3.8/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/marshaller.py
24 15 3
def __unmarshall_model()
in python3.6/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/marshaller.py
24 15 3
def __unmarshall_model()
in python3.9/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/marshaller.py
24 15 3
def to_dict()
in python3.7/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/aws_event.py
23 9 1
def to_dict()
in python3.7/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/ec2_instance_state_change_notification.py
23 9 1
def to_dict()
in python3.8/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/aws_event.py
23 9 1
def to_dict()
in python3.8/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/ec2_instance_state_change_notification.py
23 9 1
def to_dict()
in python3.6/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/aws_event.py
23 9 1
def to_dict()
in python3.6/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/ec2_instance_state_change_notification.py
23 9 1
def to_dict()
in python3.9/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/aws_event.py
23 9 1
def to_dict()
in python3.9/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/ec2_instance_state_change_notification.py
23 9 1
public async Task FunctionHandler()
in dotnetcore3.1/cookiecutter-aws-sam-quick-start-s3-dotnet/{{cookiecutter.project_name}}/src/{{cookiecutter.project_name}}/Function.cs
22 3 2
def marshall()
in python3.7/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/marshaller.py
21 12 2
def marshall()
in python3.8/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world_function/model/aws/ec2/marshaller.py
21 12 2