awslabs / aws-innovation-sandbox
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 42 units with 1,155 lines of code in units (54.5% of code).
    • 1 very long units (129 lines of code)
    • 0 long units (0 lines of code)
    • 26 medium size units (815 lines of code)
    • 10 small units (167 lines of code)
    • 5 very small units (44 lines of code)
11% | 0% | 70% | 14% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts73% | 0% | 26% | 0% | 0%
py0% | 0% | 78% | 17% | 4%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/lib73% | 0% | 26% | 0% | 0%
source/Lambda0% | 0% | 78% | 16% | 4%
source/Lambda/utils0% | 0% | 74% | 18% | 6%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in source/lib/InnovationSandboxManagementAccount.ts
129 2 4
def accept_resource_share_sbx()
in source/Lambda/innovation_accept_resource_share.py
49 13 1
def create()
in source/Lambda/innovation_run_sbx_stack.py
49 2 2
constructor()
in source/lib/InnovationSandboxTransitGatewaySetup.ts
47 1 4
def validate_inputs()
in source/Lambda/innovation_create_account_ou.py
44 15 8
def create()
in source/Lambda/innovation_tgw_route_tables.py
37 2 2
def create()
in source/Lambda/innovation_run_mgmt_stack.py
37 2 2
def run_stack()
in source/Lambda/utils/innovation_sbx_helpers.py
35 2 5
def del_rtb()
in source/Lambda/innovation_delete_default_vpcs.py
33 7 2
def create()
in source/Lambda/innovation_create_account_ou.py
33 2 2
def create_account()
in source/Lambda/innovation_create_account_ou.py
32 5 3
def delete_default_VPC()
in source/Lambda/innovation_delete_default_vpcs.py
31 7 1
def del_igw()
in source/Lambda/innovation_delete_default_vpcs.py
30 4 2
def del_acl()
in source/Lambda/innovation_delete_default_vpcs.py
30 7 2
def del_sub()
in source/Lambda/innovation_delete_default_vpcs.py
28 6 2
def main()
in source/Lambda/innovation_run_sbx_stack.py
28 5 2
def create_ou_move_act()
in source/Lambda/innovation_create_account_ou.py
28 3 4
def del_sgp()
in source/Lambda/innovation_delete_default_vpcs.py
27 5 2
def create()
in source/Lambda/innovation_sbx_attach_scp.py
27 2 2
def main()
in source/Lambda/innovation_tgw_route_tables.py
26 5 2