aws-samples / aws-cdk-pipelines-datalake-infrastructure
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 16 units with 432 lines of code in units (59.8% of code).
    • 1 very long units (117 lines of code)
    • 2 long units (158 lines of code)
    • 4 medium size units (107 lines of code)
    • 2 small units (26 lines of code)
    • 7 very small units (24 lines of code)
27% | 36% | 24% | 6% | 5%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py27% | 36% | 24% | 6% | 5%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib27% | 36% | 24% | 6% | 5%
Alternative Visuals
Longest Units
Top 16 longest units
Unit# linesMcCabe index# params
def __init__()
in lib/vpc_stack.py
117 1 5
def create_environment_pipeline()
in lib/pipeline_stack.py
90 1 4
def create_data_lake_zone_bucket()
in lib/s3_bucket_zones_stack.py
68 5 5
def get_local_configuration()
in lib/configuration.py
36 7 1
def create_kms_key()
in lib/s3_bucket_zones_stack.py
26 2 4
def get_tag()
in lib/tagging.py
24 2 2
21 1 1
def create_access_logs_bucket()
in lib/s3_bucket_zones_stack.py
15 1 4
def get_all_configurations()
in lib/configuration.py
11 1 0
def tag()
in lib/tagging.py
5 1 2
def __init__()
in lib/pipeline_stack.py
4 1 0
def __init__()
in lib/s3_bucket_zones_stack.py
4 1 0
def __init__()
in lib/pipeline_deploy_stage.py
4 1 0
def __init__()
in lib/empty_stack.py
3 1 4
def get_logical_id_prefix()
in lib/configuration.py
2 1 0
def get_resource_name_prefix()
in lib/configuration.py
2 1 0