aws-samples / aws-enterprise-jumpstart
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 8 units with 178 lines of code in units (5.7% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (72 lines of code)
    • 2 medium size units (66 lines of code)
    • 1 small units (13 lines of code)
    • 4 very small units (27 lines of code)
0% | 40% | 37% | 7% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 40% | 37% | 7% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
scripts0% | 40% | 37% | 7% | 15%
Alternative Visuals
Longest Units
Top 8 longest units
Unit# linesMcCabe index# params
def main()
in scripts/baseline.py
72 4 0
def lambda_handler()
in scripts/s3_block_public_access.py
33 1 2
def lambda_handler()
in scripts/default_vpc_removal.py
33 7 2
def create_cfn_admin_role()
in scripts/core_account_baseline.py
13 2 1
def __cleanup_versions()
in scripts/update_blueprint_versions.py
10 4 3
def __get_policy_by_name()
in scripts/create_update_scps.py
6 4 2
def __search_provisioned_products()
in scripts/upgrade_accounts_in_ou.py
6 4 1
def __list_accounts_for_parent()
in scripts/upgrade_accounts_in_ou.py
5 3 1