aws-ia / terraform-aws-control_tower_account_factory
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 164 units with 1,738 lines of code in units (15.3% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (241 lines of code)
    • 20 medium size units (577 lines of code)
    • 32 small units (447 lines of code)
    • 108 very small units (473 lines of code)
0% | 13% | 33% | 25% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 13% | 33% | 25% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
modules/aft-account-request-framework0% | 36% | 34% | 17% | 12%
modules/aft-feature-options0% | 20% | 31% | 20% | 27%
sources/scripts0% | 19% | 24% | 32% | 23%
modules/aft-account-provisioning-framework0% | 0% | 53% | 22% | 24%
sources/aft-lambda-layer0% | 0% | 24% | 28% | 46%
modules/aft-customizations0% | 0% | 45% | 33% | 20%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in modules/aft-feature-options/lambda/aft-delete-default-vpc/aft_delete_default_vpc.py
69 5 5
def set_aws_credentials()
in sources/scripts/workspace_manager.py
67 4 4
def lambda_handler()
in modules/aft-account-request-framework/lambda/aft-account-request-processor/aft_account_request_processor.py
54 9 5
def lambda_handler()
in modules/aft-account-request-framework/lambda/aft-account-request-action-trigger/aft_account_request_action_trigger.py
51 8 5
def lambda_handler()
in modules/aft-account-provisioning-framework/lambda/aft-account-provisioning-framework-account-metadata-ssm/aft_account_provisioning_framework_account_metadata_ssm.py
50 3 5
def lambda_handler()
in modules/aft-account-request-framework/lambda/aft-account-request-audit-trigger/aft_account_request_audit_trigger.py
40 7 5
def lambda_handler()
in modules/aft-account-request-framework/lambda/aft-invoke-aft-account-provisioning-framework/aft_invoke_aft_account_provisioning_framework.py
38 5 5
def stage_run()
in sources/scripts/workspace_manager.py
35 1 4
def lambda_handler()
in modules/aft-customizations/lambda/aft-customizations-invoke-account-provisioning-framework/aft_customizations_invoke_account_provisioning_framework.py
35 3 5
def lambda_handler()
in modules/aft-feature-options/lambda/aft-enable-cloudtrail/aft_enable_cloudtrail.py
33 6 5
def set_terraform_variables()
in sources/scripts/workspace_manager.py
30 4 3
def get_account_info()
in sources/aft-lambda-layer/aft_common/aft_utils.py
28 2 2
def lambda_handler()
in modules/aft-account-provisioning-framework/lambda/aft-account-provisioning-framework-tag-account/aft_account_provisioning_framework_tag_account.py
28 5 5
def get_pipeline_for_account()
in modules/aft-customizations/lambda/aft-customizations-execute-pipeline/aft_customizations_execute_pipeline.py
27 7 2
def lambda_handler()
in modules/aft-account-provisioning-framework/lambda/aft-account-provisioning-framework-create-role/aft_account_provisioning_framework_create_role.py
26 3 5
def put_event_selectors()
in modules/aft-feature-options/lambda/aft-enable-cloudtrail/aft_enable_cloudtrail.py
26 1 2
def get_default_vpc()
in modules/aft-feature-options/lambda/aft-delete-default-vpc/aft_delete_default_vpc.py
26 4 1
def get_org_ou_names()
in sources/aft-lambda-layer/aft_common/aft_utils.py
25 5 1
def lambda_handler()
in modules/aft-feature-options/lambda/aft-enroll-support/aft_enroll_support.py
23 4 4
def get_org_ou_id()
in sources/aft-lambda-layer/aft_common/aft_utils.py
22 4 2