aws-samples / aws-account-vending-machine
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 10 units with 270 lines of code in units (16.9% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (141 lines of code)
    • 2 medium size units (56 lines of code)
    • 4 small units (63 lines of code)
    • 2 very small units (10 lines of code)
0% | 52% | 20% | 23% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 52% | 20% | 23% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
resources0% | 52% | 20% | 23% | 3%
Alternative Visuals
Longest Units
Top 10 longest units
Unit# linesMcCabe index# params
def deploy_resources()
in resources/AccountCreationLambda.py
71 8 7
def main()
in resources/AccountCreationLambda.py
70 11 2
def delete_default_vpc()
in resources/AccountCreationLambda.py
29 9 2
def get_ou_name_id()
in resources/AccountCreationLambda.py
27 9 3
def assume_role()
in resources/AccountCreationLambda.py
17 3 2
def delete_respond_cloudformation()
in resources/AccountCreationLambda.py
17 1 3
def create_account()
in resources/AccountCreationLambda.py
16 3 6
def respond_cloudformation()
in resources/AccountCreationLambda.py
13 1 3
def get_template()
in resources/AccountCreationLambda.py
7 1 2
def get_client()
in resources/AccountCreationLambda.py
3 1 1