aws-quickstart / quickstart-alz-examples
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 28 units with 335 lines of code in units (73.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (150 lines of code)
    • 7 small units (99 lines of code)
    • 16 very small units (86 lines of code)
0% | 0% | 44% | 29% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 44% | 29% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda/source0% | 0% | 44% | 29% | 25%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def create_sc_product_template()
in lambda/source/create_sc_template.py
44 13 3
def fetchUserInputData()
in lambda/source/create_add_on_zip.py
32 4 3
def lambda_handler()
in lambda/source/invoke_state_machine.py
28 6 2
def send_cfnresponse()
in lambda/source/invoke_state_machine.py
25 3 6
def create_and_upload()
in lambda/source/create_input_files.py
21 7 4
def lambda_handler()
in lambda/source/create_add_on_zip.py
19 1 2
def fetchProductTemplateData()
in lambda/source/create_add_on_zip.py
16 5 2
def lambda_handler()
in lambda/source/create_sc_template.py
15 1 2
def generate_userinput_params()
in lambda/source/create_input_files.py
13 2 1
def main()
in lambda/source/create_add_on_zip.py
12 7 8
def lambda_handler()
in lambda/source/create_input_files.py
12 1 2
def search_and_replace()
in lambda/source/create_input_files.py
12 2 2
def invoke()
in lambda/source/invoke_state_machine.py
10 2 2
def fetchAddonManifestData()
in lambda/source/create_add_on_zip.py
8 1 2
def get_output()
in lambda/source/invoke_state_machine.py
7 1 1
def createZip()
in lambda/source/create_add_on_zip.py
7 2 3
def json_2_yaml()
in lambda/source/utils.py
7 1 2
def is_yaml()
in lambda/source/utils.py
7 2 1
def is_json()
in lambda/source/utils.py
7 2 1
def fetchAddonProductParameterData()
in lambda/source/create_add_on_zip.py
5 1 3