aws-samples / personalize-data-science-sdk-workflow
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 248 lines of code in units (78.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (54 lines of code)
    • 1 medium size units (32 lines of code)
    • 9 small units (134 lines of code)
    • 3 very small units (28 lines of code)
0% | 21% | 12% | 54% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 21% | 12% | 54% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda0% | 21% | 12% | 54% | 11%
Alternative Visuals
Longest Units
Top 14 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in lambda/stepfunction_create_personalize_role.py
54 6 2
def lambda_handler()
in lambda/stepfunction-create-schema.py
32 1 2
def lambda_handler()
in lambda/stepfunction-createdatasetimportjob.py
20 1 2
def lambda_handler()
in lambda/stepfunctioncreatedatasetimportjob.py
19 1 2
def lambda_handler()
in lambda/stepfunctioncreatedataset.py
16 1 2
def lambda_handler()
in lambda/stepfunction_getsolution_metric_create_campaign.py
15 1 2
def lambda_handler()
in lambda/stepfunction_select-recipe_create-solution.py
14 2 2
def lambda_handler()
in lambda/stepfunction_getRecommendations.py
14 1 2
def lambda_handler()
in lambda/stepfunction_waitforDatasetGroup.py
14 1 2
def lambda_handler()
in lambda/stepfunction_waitfordatasetimportjob.py
11 1 2
def lambda_handler()
in lambda/stepfunctioncreatedatagroup.py
11 1 2
def lambda_handler()
in lambda/stepfunction_waitforCampaign.py
10 1 2
def lambda_handler()
in lambda/stepfunction_create_solution_version.py
9 1 2
def lambda_handler()
in lambda/stepfunction_waitforSolutionVersion.py
9 1 2