aws-samples / amazon-pinpoint-segment-campaign-automation
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 7 units with 263 lines of code in units (81.9% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (80 lines of code)
    • 5 medium size units (163 lines of code)
    • 1 small units (20 lines of code)
    • 0 very small units (0 lines of code)
0% | 30% | 61% | 7% | 0%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 30% | 61% | 7% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
dynamodb-logging0% | 100% | 0% | 0% | 0%
segment-create0% | 0% | 100% | 0% | 0%
campaign-status0% | 0% | 100% | 0% | 0%
segment-status0% | 0% | 100% | 0% | 0%
campaign-delete0% | 0% | 100% | 0% | 0%
campaign-create0% | 0% | 100% | 0% | 0%
segment-delete0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 7 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in src/lamdas/dynamodb-logging/dynamodb_logging.py
80 5 2
def lambda_handler()
in src/lamdas/segment-create/segment_create.py
36 2 2
def lambda_handler()
in src/lamdas/campaign-status/campaign_status.py
34 3 2
def lambda_handler()
in src/lamdas/segment-status/segment_status.py
32 3 2
def lambda_handler()
in src/lamdas/campaign-delete/campaign_delete.py
31 2 2
def lambda_handler()
in src/lamdas/campaign-create/campaign_create.py
30 2 2
def lambda_handler()
in src/lamdas/segment-delete/segment_delete.py
20 2 2