aws-samples / email-response-automation-comprehend
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 24 units with 525 lines of code in units (81.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (70 lines of code)
    • 2 simple units (50 lines of code)
    • 21 very simple units (405 lines of code)
0% | 0% | 13% | 9% | 77%
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% | 13% | 9% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambda/workmail-org-user-domain-lambda0% | 0% | 47% | 0% | 52%
lambda/workmail-integration-lambda0% | 0% | 0% | 61% | 38%
lambda/classify-emails-lambda0% | 0% | 0% | 25% | 75%
stacks0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def is_complete()
in lambda/workmail-org-user-domain-lambda/workmailcreateorg.py
70 23 2
def validate_params()
in lambda/classify-emails-lambda/lambda_function.py
23 8 1
def lambda_handler()
in lambda/workmail-integration-lambda/lambda_function.py
27 7 2
def __init__()
in stacks/notebook_comprehend_train_deploy_project_stack.py
73 5 4
def handler()
in lambda/workmail-org-user-domain-lambda/workmailcreateorg.py
9 4 2
def on_delete()
in lambda/workmail-org-user-domain-lambda/workmailcreateorg.py
26 4 2
def get_template_data()
in lambda/classify-emails-lambda/lambda_function.py
21 3 2
def del_dereg_from_workmail()
in lambda/workmail-org-user-domain-lambda/workmailcreateorg.py
19 3 2
def send_user_email()
in lambda/classify-emails-lambda/lambda_function.py
17 2 2
def lambda_handler()
in lambda/classify-emails-lambda/lambda_function.py
14 2 2
def on_create()
in lambda/workmail-org-user-domain-lambda/workmailcreateorg.py
12 2 2
def register_email_temapltes()
in stacks/email_automation_workflow_stack.py
9 2 1
def get_trasfer_status()
in lambda/classify-emails-lambda/mock_apis.py
2 1 1
def call_endpoint()
in lambda/classify-emails-lambda/lambda_function.py
6 1 1
def best_class()
in lambda/classify-emails-lambda/lambda_function.py
2 1 1
def is_good_enough()
in lambda/classify-emails-lambda/lambda_function.py
2 1 1
def send_to_human_workflow_topic()
in lambda/classify-emails-lambda/lambda_function.py
5 1 1
def on_update()
in lambda/workmail-org-user-domain-lambda/workmailcreateorg.py
10 1 1
def start_classification_flow()
in lambda/workmail-integration-lambda/lambda_function.py
17 1 4
def __init__()
in stacks/email_automation_workflow_stack.py
6 1 4