aws-samples / email-response-automation-comprehend
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 24 units with 525 lines of code in units (81.9% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (224 lines of code)
    • 6 medium size units (161 lines of code)
    • 5 small units (79 lines of code)
    • 10 very small units (61 lines of code)
0% | 42% | 30% | 15% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 42% | 30% | 15% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
stacks0% | 63% | 26% | 0% | 10%
lambda/workmail-org-user-domain-lambda0% | 47% | 17% | 21% | 13%
lambda/classify-emails-lambda0% | 0% | 47% | 33% | 18%
lambda/workmail-integration-lambda0% | 0% | 61% | 38% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in stacks/workmailorg_project_stack.py
81 1 4
def __init__()
in stacks/notebook_comprehend_train_deploy_project_stack.py
73 5 4
def is_complete()
in lambda/workmail-org-user-domain-lambda/workmailcreateorg.py
70 23 2
def classify_email_lambda()
in stacks/email_automation_workflow_stack.py
39 1 2
def lambda_handler()
in lambda/workmail-integration-lambda/lambda_function.py
27 7 2
def on_delete()
in lambda/workmail-org-user-domain-lambda/workmailcreateorg.py
26 4 2
def workmail_integration_lambda()
in stacks/email_automation_workflow_stack.py
25 1 2
def validate_params()
in lambda/classify-emails-lambda/lambda_function.py
23 8 1
def get_template_data()
in lambda/classify-emails-lambda/lambda_function.py
21 3 2
def del_dereg_from_workmail()
in lambda/workmail-org-user-domain-lambda/workmailcreateorg.py
19 3 2
def send_user_email()
in lambda/classify-emails-lambda/lambda_function.py
17 2 2
def start_classification_flow()
in lambda/workmail-integration-lambda/lambda_function.py
17 1 4
def lambda_handler()
in lambda/classify-emails-lambda/lambda_function.py
14 2 2
def on_create()
in lambda/workmail-org-user-domain-lambda/workmailcreateorg.py
12 2 2
def on_update()
in lambda/workmail-org-user-domain-lambda/workmailcreateorg.py
10 1 1
def human_workflow_topic()
in stacks/email_automation_workflow_stack.py
10 1 1
def handler()
in lambda/workmail-org-user-domain-lambda/workmailcreateorg.py
9 4 2
def register_email_temapltes()
in stacks/email_automation_workflow_stack.py
9 2 1
def call_endpoint()
in lambda/classify-emails-lambda/lambda_function.py
6 1 1
def __init__()
in stacks/email_automation_workflow_stack.py
6 1 4