aws-samples / amazon-redshift-infrastructure-automation
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 30 units with 280 lines of code in units (23.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (149 lines of code)
    • 1 small units (15 lines of code)
    • 24 very small units (116 lines of code)
0% | 0% | 53% | 5% | 41%
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% | 53% | 5% | 41%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
redshift_poc_automation/stacks0% | 0% | 47% | 0% | 52%
ROOT0% | 0% | 66% | 18% | 14%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def dms_access_for_endpoint()
in redshift_poc_automation/stacks/dmsinstance_stack.py
37 2 1
def handler()
in lambda_call_lambda_to_run_redshift_script.py
32 4 2
def dms_vpc_role()
in redshift_poc_automation/stacks/dmsinstance_stack.py
30 2 1
def dms_cloudwatch_logs_role()
in redshift_poc_automation/stacks/dmsinstance_stack.py
28 2 1
def handler()
in lambda_run_redshift_script.py
22 4 2
def run_sql()
in lambda_run_redshift_script.py
15 4 7
def __init__()
in redshift_poc_automation/stacks/jmeter_stack.py
10 1 0
def __init__()
in redshift_poc_automation/stacks/sct_stack.py
10 1 0
def __init__()
in redshift_poc_automation/stacks/dms_on_prem_to_redshift_stack.py
9 1 0
def __init__()
in redshift_poc_automation/stacks/vpc_stack.py
8 1 0
def __init__()
in redshift_poc_automation/stacks/redshift_stack.py
8 1 0
def __init__()
in redshift_poc_automation/stacks/dmsinstance_stack.py
7 1 0
def get_config_from_s3()
in lambda_run_redshift_script.py
6 1 1
def sql_status()
in lambda_run_redshift_script.py
6 2 1
def get_vpc_public_subnet_ids()
in redshift_poc_automation/stacks/vpc_stack.py
4 1 1
def get_vpc_private_isolated_subnet_ids()
in redshift_poc_automation/stacks/vpc_stack.py
4 1 1
def get_vpc_private_subnet_ids()
in redshift_poc_automation/stacks/vpc_stack.py
4 1 1
def get_cluster()
in redshift_poc_automation/stacks/redshift_stack.py
4 2 1
def get_cluster_dbname()
in redshift_poc_automation/stacks/redshift_stack.py
4 2 1
def get_cluster_user()
in redshift_poc_automation/stacks/redshift_stack.py
4 2 1