aws-samples / amazon-sagemaker-mlops-with-featurestore-and-datawrangler
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 84 units with 935 lines of code in units (20.5% 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)
    • 3 simple units (95 lines of code)
    • 81 very simple units (840 lines of code)
0% | 0% | 0% | 10% | 89%
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% | 10% | 89%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
repos/serving/lambdas0% | 0% | 0% | 26% | 73%
repos/features_ingestion_pipeline/infra0% | 0% | 0% | 29% | 70%
infra0% | 0% | 0% | 0% | 100%
repos/serving/infra0% | 0% | 0% | 0% | 100%
repos/build_pipeline/pipelines0% | 0% | 0% | 0% | 100%
repos/features_ingestion_pipeline/pipelines0% | 0% | 0% | 0% | 100%
demo-workspace/utils0% | 0% | 0% | 0% | 100%
lambdas/functions/auto_approval0% | 0% | 0% | 0% | 100%
repos/build_pipeline/infra0% | 0% | 0% | 0% | 100%
repos/build_pipeline/lambdas0% | 0% | 0% | 0% | 100%
repos/serving/pipelines0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
demo-workspace/tensorflow0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_fg_conf()
in repos/features_ingestion_pipeline/infra/feature_store_utils.py
21 6 3
def lambda_handler()
in repos/serving/lambdas/functions/read-ddb/lambda_function.py
37 6 2
def lambda_handler()
in repos/serving/lambdas/functions/read-sm/lambda_function.py
37 6 2
def get_processing_output()
in repos/serving/infra/model_endpoint_construct.py
20 5 3
def lambda_handler()
in repos/serving/lambdas/functions/processing-job-execution/lambda_function.py
44 4 2
def lambda_handler()
in repos/serving/lambdas/functions/xgboost_inference/lambda_function.py
52 4 2
def lambda_handler()
in repos/serving/lambdas/functions/execute-state-machine/lambda_function.py
32 4 2
def lambda_handler()
in repos/serving/lambdas/functions/processing-job-status-check/lambda_function.py
20 4 2
def process_sns_message()
in lambdas/functions/auto_approval/lambda.py
35 4 1
def lambda_handler()
in repos/serving/lambdas/functions/datafreshness-check/lambda_function.py
9 3 2
def __init__()
in repos/features_ingestion_pipeline/pipelines/parse_flow.py
5 2 3
def generate_query()
in repos/build_pipeline/pipelines/xgboost_pipeline.py
19 2 2
def datetimeconverter()
in repos/serving/lambdas/functions/processing-job-execution/lambda_function.py
3 2 1
def default()
in repos/serving/lambdas/functions/read-ddb/lambda_function.py
4 2 2
def json_serial()
in repos/serving/lambdas/functions/execute-state-machine/lambda_function.py
4 2 1
def datetimeconverter()
in repos/serving/lambdas/functions/processing-job-status-check/lambda_function.py
3 2 1
def default()
in repos/serving/lambdas/functions/read-sm/lambda_function.py
4 2 2
def lambda_handler()
in lambdas/functions/auto_approval/lambda.py
4 2 2
def get_and_upload_data()
in demo-workspace/utils/get_datasets.py
16 2 2
def format_feature_defs()
in demo-workspace/utils/feature_store_utils.py
2 2 1