aws-solutions / mlops-workload-orchestrator
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 242 units with 3,572 lines of code in units (62.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (207 lines of code)
    • 6 simple units (549 lines of code)
    • 233 very simple units (2,816 lines of code)
0% | 0% | 5% | 15% | 78%
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% | 5% | 15% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/lambdas/pipeline_orchestration0% | 0% | 24% | 24% | 50%
source/lib/blueprints/byom/lambdas0% | 0% | 18% | 9% | 72%
source/lib/blueprints/byom0% | 0% | 6% | 5% | 87%
source/lib0% | 0% | 0% | 96% | 3%
source/lib/blueprints/byom/pipeline_definitions0% | 0% | 0% | 2% | 97%
source/lambdas/pipeline_orchestration/shared0% | 0% | 0% | 0% | 100%
source/lambdas/solution_helper0% | 0% | 0% | 0% | 100%
source/lambdas/custom_resource0% | 0% | 0% | 0% | 100%
source0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def handler()
in source/lib/blueprints/byom/lambdas/create_baseline_job/main.py
73 21 2
def get_required_keys()
in source/lambdas/pipeline_orchestration/lambda_helpers.py
75 16 3
def _add_model_quality_resources()
in source/lib/blueprints/byom/model_monitor.py
59 12 1
def get_template_parameters()
in source/lambdas/pipeline_orchestration/lambda_helpers.py
60 10 4
def __init__()
in source/lib/mlops_orchestrator_stack.py
354 8 6
def sagemaker_policy_statement()
in source/lib/blueprints/byom/pipeline_definitions/iam_policies.py
31 7 3
def __init__()
in source/lib/blueprints/byom/model_monitor.py
50 6 5
def lambda_handler()
in source/lib/blueprints/byom/lambdas/create_update_cf_stackset/main.py
39 6 2
def handler()
in source/lambdas/pipeline_orchestration/index.py
15 6 4
def copy_assets_to_s3()
in source/lambdas/custom_resource/index.py
19 5 1
def custom_resource()
in source/lambdas/solution_helper/lambda_function.py
9 5 2
def handler()
in source/lib/blueprints/byom/lambdas/batch_transform/main.py
33 4 2
def stackset_exists()
in source/lib/blueprints/byom/lambdas/create_update_cf_stackset/stackset_helpers.py
11 4 2
def _sanitize_data()
in source/lambdas/solution_helper/lambda_function.py
17 4 1
def get_logger()
in source/lambdas/pipeline_orchestration/shared/logger.py
12 4 1
def api_exception_handler()
in source/lambdas/pipeline_orchestration/shared/wrappers.py
13 4 1
def create_copy_assets_lambda()
in source/lib/blueprints/byom/pipeline_definitions/deploy_actions.py
26 3 2
def ecr_policy_document()
in source/lib/blueprints/byom/pipeline_definitions/iam_policies.py
25 3 3
def _create_sagemaker_monitor_role()
in source/lib/blueprints/byom/model_monitor.py
23 3 1
def _add_model_bias_explainability_extra_attributes()
in source/lib/blueprints/byom/model_monitor.py
46 3 1