aws-samples / cdk-glue-orchestrate-redshift
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 25 units with 426 lines of code in units (60.9% of code).
    • 1 very long units (113 lines of code)
    • 1 long units (51 lines of code)
    • 7 medium size units (182 lines of code)
    • 2 small units (34 lines of code)
    • 14 very small units (46 lines of code)
26% | 11% | 42% | 7% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py26% | 11% | 42% | 7% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
redshift_benchmark59% | 26% | 14% | 0% | 0%
redshift_benchmark/lib0% | 0% | 75% | 0% | 24%
scripts/glue_script0% | 0% | 56% | 28% | 15%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in redshift_benchmark/redshiftBenchmarkStack.py
113 6 16
def rs_sql_task()
in redshift_benchmark/redshiftBenchmarkStack.py
51 4 4
def __init__()
in redshift_benchmark/lib/cdkGlueStack.py
35 1 15
def __init__()
in redshift_benchmark/lib/cdkGlueStack.py
31 1 7
def run_benchmark_query()
in redshift_benchmark/redshiftBenchmarkStack.py
27 1 3
def __init__()
in scripts/glue_script/run_redshift_benchmark.py
23 1 11
def run_parallel_task()
in scripts/glue_script/run_redshift_benchmark.py
23 6 1
def __init__()
in redshift_benchmark/lib/cdkVPCStack.py
22 1 4
def rs_con_pool()
in scripts/glue_script/run_redshift_benchmark.py
21 2 1
def rs_select()
in scripts/glue_script/run_redshift_benchmark.py
20 3 5
def run_sequential_task()
in scripts/glue_script/run_redshift_benchmark.py
14 3 1
def get_connection()
in scripts/glue_script/submit_redshift_sql.py
6 1 5
def __init__()
in redshift_benchmark/lib/cdkInitialAssets.py
5 1 5
def __init__()
in redshift_benchmark/lib/cdkRedshiftStack.py
5 1 0
def get_vpc_public_subnet_ids()
in redshift_benchmark/lib/cdkVPCStack.py
4 1 1
def get_vpc_private_subnet_ids()
in redshift_benchmark/lib/cdkVPCStack.py
4 1 1
def query()
in scripts/glue_script/submit_redshift_sql.py
4 1 2
def close_pool()
in scripts/glue_script/run_redshift_benchmark.py
3 2 1
def get_result()
in scripts/glue_script/run_redshift_benchmark.py
3 1 1
def get_vpc()
in redshift_benchmark/lib/cdkVPCStack.py
2 1 1