aws-samples / amazon-account-automation-cloudchekr
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 14 units with 470 lines of code in units (48.9% of code).
    • 1 very long units (134 lines of code)
    • 1 long units (69 lines of code)
    • 5 medium size units (179 lines of code)
    • 5 small units (77 lines of code)
    • 2 very small units (11 lines of code)
28% | 14% | 38% | 16% | 2%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py28% | 14% | 38% | 16% | 2%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT28% | 14% | 38% | 16% | 2%
Alternative Visuals
Longest Units
Top 14 longest units
Unit# linesMcCabe index# params
def main()
in AccountCreationLambda.py
134 18 2
def deploy_resources()
in AccountCreationLambda.py
69 8 7
def get_role_arn_from_stack()
in AccountCreationLambda.py
48 11 2
39 2 8
def delete_default_vpc()
in AccountCreationLambda.py
35 9 2
def get_ou_name_id()
in AccountCreationLambda.py
33 9 3
def create_account()
in AccountCreationLambda.py
24 3 7
def add_role_to_cloudcheckr()
in AccountCreationLambda.py
20 3 4
def assume_role()
in AccountCreationLambda.py
18 3 2
def create_account_in_cloudcheckr()
in AccountCreationLambda.py
14 2 3
def respond_cloudformation()
in AccountCreationLambda.py
13 1 3
def get_ous()
in AccountCreationLambda.py
12 3 1
def get_template()
in AccountCreationLambda.py
8 1 2
def get_client()
in AccountCreationLambda.py
3 1 1