aws-samples / amazon-personalize-immersion-day
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 42 units with 459 lines of code in units (18.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 1 simple units (13 lines of code)
    • 41 very simple units (446 lines of code)
0% | 0% | 0% | 2% | 97%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 0% | 0% | 2% | 97%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
notebooks/Automated-Media0% | 0% | 0% | 24% | 75%
automation/ml_ops/lambdas/create-dataset0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/create-campaign0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/create-solution0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/import-data0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/s3lambda0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/event-tracker0% | 0% | 0% | 0% | 100%
automation/ml_ops/shared/python0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/create-datasetgroup0% | 0% | 0% | 0% | 100%
automation/streaming_events/lambdas/getRecommendations0% | 0% | 0% | 0% | 100%
automation/ml_ops/lambdas/notify-delete0% | 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%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _get_dataset_group_arn()
in notebooks/Automated-Media/script.py
13 6 1
def lambda_handler()
in automation/ml_ops/lambdas/create-campaign/campaign.py
38 5 2
def get_message()
in automation/ml_ops/lambdas/notify-delete/notify-delete.py
11 5 1
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 _get_campaigns()
in notebooks/Automated-Media/script.py
6 4 1
def take_action()
in automation/ml_ops/shared/python/actions.py
6 3 1
def create_schema()
in automation/ml_ops/lambdas/create-dataset/dataset.py
26 3 2
def get_message()
in automation/ml_ops/lambdas/notify/notify.py
6 3 1
def _get_solutions()
in notebooks/Automated-Media/script.py
7 3 1
def _get_event_trackers()
in notebooks/Automated-Media/script.py
5 3 1
def _get_datasets_and_schemas()
in notebooks/Automated-Media/script.py
7 3 1
def take_action_delete()
in automation/ml_ops/shared/python/actions.py
4 2 1
def lambda_handler()
in automation/ml_ops/lambdas/list-solutions/list-solutions.py
10 2 2
def lambda_handler()
in automation/ml_ops/lambdas/event-tracker/eventTracker.py
23 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/list-solution-versions/list-solution-versions.py
10 2 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 lambda_handler()
in automation/ml_ops/lambdas/delete-datasetgroup/delete-datasetgroup.py
8 2 2