aws-samples / aws-lambda-lifecycle-hooks-function
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 223 lines of code in units (49.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (92 lines of code)
    • 6 small units (103 lines of code)
    • 4 very small units (28 lines of code)
0% | 0% | 41% | 46% | 12%
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% | 41% | 46% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 0% | 41% | 46% | 12%
cloudformation0% | 0% | 41% | 45% | 12%
Alternative Visuals
Longest Units
Top 14 longest units
Unit# linesMcCabe index# params
def send_command()
in lambda_backup.py
23 5 1
def lambda_handler()
in lambda_backup.py
23 7 2
def send_command()
in cloudformation/lambda_backup.py
23 5 1
def lambda_handler()
in cloudformation/lambda_backup.py
23 7 2
def check_command()
in lambda_backup.py
20 7 2
def check_command()
in cloudformation/lambda_backup.py
19 6 2
def check_document()
in lambda_backup.py
16 4 0
def abandon_lifecycle()
in lambda_backup.py
16 3 3
def check_document()
in cloudformation/lambda_backup.py
16 4 0
def abandon_lifecycle()
in cloudformation/lambda_backup.py
16 3 3
def check_response()
in lambda_backup.py
8 3 1
def check_response()
in cloudformation/lambda_backup.py
8 3 1
def list_document()
in lambda_backup.py
6 1 0
def list_document()
in cloudformation/lambda_backup.py
6 1 0