aws-samples / amazon-personalize-immersion-day
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 42 units with 459 lines of code in units (18.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (142 lines of code)
    • 8 small units (123 lines of code)
    • 29 very small units (194 lines of code)
0% | 0% | 30% | 26% | 42%
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% | 30% | 26% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
automation/ml_ops/lambdas/create-dataset0% | 0% | 100% | 0% | 0%
automation/ml_ops/lambdas/create-campaign0% | 0% | 100% | 0% | 0%
automation/ml_ops/lambdas/import-data0% | 0% | 100% | 0% | 0%
automation/ml_ops/lambdas/event-tracker0% | 0% | 100% | 0% | 0%
automation/ml_ops/lambdas/create-solution0% | 0% | 0% | 100% | 0%
notebooks/Automated-Media0% | 0% | 0% | 45% | 54%
automation/ml_ops/lambdas/create-datasetgroup0% | 0% | 0% | 100% | 0%
automation/streaming_events/lambdas/getRecommendations0% | 0% | 0% | 100% | 0%
automation/ml_ops/lambdas/s3lambda0% | 0% | 0% | 73% | 26%
automation/ml_ops/lambdas/notify-delete0% | 0% | 0% | 68% | 31%
automation/ml_ops/shared/python0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/notify0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/list-solutions0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/list-solution-versions0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/list-datasets0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/list-campaigns0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/list-trackers0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/delete-campaign0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/delete-datasetgroup0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/delete-solution0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/delete-dataset0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/wait-delete-datasetgroup0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/wait-delete-dataset0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/wait-delete-solution0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/wait-delete-campaign0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/wait-solution-version0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/wait-delete-tracker0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/delete-tracker0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in automation/ml_ops/lambdas/create-campaign/campaign.py
38 5 2
def lambda_handler()
in automation/ml_ops/lambdas/import-data/datasetimport.py
28 2 2
def lambda_handler()
in automation/ml_ops/lambdas/create-dataset/dataset.py
27 2 2
def create_schema()
in automation/ml_ops/lambdas/create-dataset/dataset.py
26 3 2
def lambda_handler()
in automation/ml_ops/lambdas/event-tracker/eventTracker.py
23 2 2
def lambda_handler()
in automation/ml_ops/lambdas/create-datasetgroup/datasetgroup.py
20 2 2
def handler()
in automation/streaming_events/lambdas/getRecommendations/getRecommendations.py
19 4 2
def create_solution()
in automation/ml_ops/lambdas/create-solution/solution.py
19 4 2
def lambda_handler()
in automation/ml_ops/lambdas/s3lambda/parse.py
17 1 2
def lambda_handler()
in automation/ml_ops/lambdas/create-solution/solution.py
13 1 2
def _get_dataset_group_arn()
in notebooks/Automated-Media/script.py
13 6 1
def get_message()
in automation/ml_ops/lambdas/notify-delete/notify-delete.py
11 5 1
def get_dataset_group_info()
in notebooks/Automated-Media/script.py
11 2 2
def lambda_handler()
in automation/ml_ops/lambdas/list-solutions/list-solutions.py
10 2 2
def lambda_handler()
in automation/ml_ops/lambdas/list-solution-versions/list-solution-versions.py
10 2 2
def lambda_handler()
in automation/ml_ops/lambdas/list-datasets/list-datasets.py
10 2 2
def lambda_handler()
in automation/ml_ops/lambdas/list-campaigns/list-campaigns.py
10 2 2
def lambda_handler()
in automation/ml_ops/lambdas/list-trackers/list-trackers.py
10 2 2
def lambda_handler()
in automation/ml_ops/lambdas/delete-campaign/delete-campaign.py
8 2 2
def lambda_handler()
in automation/ml_ops/lambdas/delete-datasetgroup/delete-datasetgroup.py
8 2 2