aws-samples / amazon-mwaa-examples
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 39 units with 545 lines of code in units (27.6% 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 (16 lines of code)
    • 38 very simple units (529 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% | 3% | 96%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
usecases/mwaa-with-codeartifact/lambda0% | 0% | 0% | 37% | 62%
usecases/image-processing/dags0% | 0% | 0% | 0% | 100%
usecases/mwaa-with-codeartifact/infra0% | 0% | 0% | 0% | 100%
dags/xgboost-ml-pipeline/1.100% | 0% | 0% | 0% | 100%
dags/xgboost-ml-pipeline/2.00% | 0% | 0% | 0% | 100%
dags/metadb_to_secrets_manager/1.100% | 0% | 0% | 0% | 100%
usecases/image-processing/lambda0% | 0% | 0% | 0% | 100%
usecases/mwaa-with-codeartifact/mwaa-ca-bucket-content0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def cfn_response()
in usecases/mwaa-with-codeartifact/lambda/lambda_handler.py
16 6 1
def write_all_to_aws_sm_fn()
in dags/metadb_to_secrets_manager/1.10/metadb_to_secrets_manager.py
27 5 1
def face_detection()
in usecases/image-processing/dags/1.10/image_processing.py
25 4 2
def face_detection()
in usecases/image-processing/dags/2.0/image_processing.py
25 4 2
def face_detection()
in usecases/image-processing/dags/image_processing.py
25 4 2
def check_duplicate()
in usecases/image-processing/dags/1.10/image_processing.py
22 3 2
def check_duplicate()
in usecases/image-processing/dags/2.0/image_processing.py
22 3 2
def check_duplicate()
in usecases/image-processing/dags/image_processing.py
22 3 2
def create_endpoints()
in usecases/mwaa-with-codeartifact/infra/vpc_stack.py
30 2 1
def tag_subnets()
in usecases/mwaa-with-codeartifact/infra/vpc_stack.py
5 2 1
def handler()
in usecases/mwaa-with-codeartifact/lambda/lambda_handler.py
27 2 2
def preprocess_glue()
in dags/xgboost-ml-pipeline/1.10/mwaa-customer-churn-dag.py
32 1 0
def get_sagemaker_role_arn()
in dags/xgboost-ml-pipeline/1.10/mwaa-customer-churn-dag.py
4 1 2
def preprocess_glue()
in dags/xgboost-ml-pipeline/2.0/mwaa-customer-churn-dag.py
32 1 0
def get_sagemaker_role_arn()
in dags/xgboost-ml-pipeline/2.0/mwaa-customer-churn-dag.py
4 1 2
def write_to_sm_fn()
in dags/metadb_to_secrets_manager/1.10/metadb_to_secrets_manager.py
8 1 3
def create_thumbnail()
in usecases/image-processing/dags/1.10/image_processing.py
8 1 2
def add_face_index()
in usecases/image-processing/dags/1.10/image_processing.py
16 1 2
def persist_data()
in usecases/image-processing/dags/1.10/image_processing.py
15 1 1
def create_thumbnail()
in usecases/image-processing/dags/2.0/image_processing.py
8 1 2