awslabs / thingpress
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 30 units with 313 lines of code in units (45.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (110 lines of code)
    • 7 small units (94 lines of code)
    • 19 very small units (109 lines of code)
0% | 0% | 35% | 30% | 34%
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% | 35% | 30% | 34%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda-supplier-providers/Microchip0% | 0% | 59% | 0% | 40%
lambda-bulk-importer0% | 0% | 32% | 39% | 28%
lambda-product-providers0% | 0% | 0% | 83% | 16%
lambda-supplier-providers/Infineon0% | 0% | 0% | 40% | 60%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def run()
in lambda-supplier-providers/Microchip/ManifestHandler.py
36 7 1
def process_certificate()
in lambda-bulk-importer/main.py
28 7 1
def process_thing()
in lambda-bulk-importer/main.py
25 4 3
def __init__()
in lambda-supplier-providers/Microchip/ManifestHandler.py
21 1 3
def process()
in lambda-product-providers/main.py
15 4 1
def process_sqs()
in lambda-bulk-importer/main.py
14 2 0
def invoke_export()
in lambda-supplier-providers/Infineon/main.py
14 5 2
def get_policy()
in lambda-bulk-importer/main.py
13 4 1
def get_thing_group()
in lambda-bulk-importer/main.py
13 4 1
def get_thing_type()
in lambda-bulk-importer/main.py
13 4 1
def process_thing_group()
in lambda-bulk-importer/main.py
12 2 2
def invoke_export()
in lambda-supplier-providers/Microchip/ManifestHandler.py
10 2 3
def lambda_handler()
in lambda-bulk-importer/main.py
9 4 2
def get_name_from_certificate()
in lambda-bulk-importer/main.py
8 1 1
def lambda_handler()
in lambda-supplier-providers/Microchip/main.py
8 2 2
def format_certificate()
in lambda-supplier-providers/Infineon/main.py
8 1 1
def get_certificate()
in lambda-bulk-importer/main.py
7 1 1
def get_certificate_arn()
in lambda-bulk-importer/main.py
7 1 1
def get_thing()
in lambda-bulk-importer/main.py
7 1 1
def s3_filebuf_bytes()
in lambda-supplier-providers/Microchip/main.py
7 1 2