aws-samples / aws-cdk-pipelines-datalake-etl
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 31 units with 682 lines of code in units (48.4% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (336 lines of code)
    • 9 medium size units (236 lines of code)
    • 2 small units (30 lines of code)
    • 15 very small units (80 lines of code)
0% | 49% | 34% | 4% | 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% | 49% | 34% | 4% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/glue_scripts0% | 47% | 41% | 0% | 11%
lib0% | 29% | 41% | 11% | 16%
lib/state_machine_trigger0% | 73% | 22% | 0% | 3%
lib/etl_job_auditor0% | 94% | 0% | 0% | 5%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def create_environment_pipeline()
in lib/pipeline_stack.py
77 1 4
def lambda_handler()
in lib/state_machine_trigger/lambda_handler.py
74 5 2
def lambda_handler()
in lib/etl_job_auditor/lambda_handler.py
65 8 2
def upsert_catalog_table()
in lib/glue_scripts/etl_conformed_to_purposebuilt.py
60 10 5
def upsert_catalog_table()
in lib/glue_scripts/etl_raw_to_conformed.py
60 7 5
def get_local_configuration()
in lib/configuration.py
36 8 1
def main()
in lib/glue_scripts/etl_raw_to_conformed.py
34 4 0
def __init__()
in lib/pipeline_deploy_stage.py
27 1 5
def main()
in lib/glue_scripts/etl_conformed_to_purposebuilt.py
26 3 0
def get_tag()
in lib/tagging.py
24 2 2
def start_etl_job_run()
in lib/state_machine_trigger/lambda_handler.py
23 3 6
def create_database()
in lib/glue_scripts/etl_conformed_to_purposebuilt.py
22 4 0
def create_database()
in lib/glue_scripts/etl_raw_to_conformed.py
22 4 0
22 1 1
def __init__()
in lib/dynamodb_stack.py
19 3 5
def get_all_configurations()
in lib/configuration.py
11 1 0
def __init__()
in lib/pipeline_stack.py
8 1 0
def table_exists()
in lib/glue_scripts/etl_conformed_to_purposebuilt.py
7 1 2
def add_partition()
in lib/glue_scripts/etl_conformed_to_purposebuilt.py
7 1 1
def table_exists()
in lib/glue_scripts/etl_raw_to_conformed.py
7 1 2