aws-samples / cdk-stepfunctions-redshift
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 105 units with 1,261 lines of code in units (79.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (183 lines of code)
    • 2 simple units (26 lines of code)
    • 101 very simple units (1,052 lines of code)
0% | 0% | 14% | 2% | 83%
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
ts0% | 0% | 24% | 0% | 75%
py0% | 0% | 3% | 4% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 60% | 0% | 39%
lambda/python/rs_integration_function0% | 0% | 14% | 0% | 85%
lambda/python/rs_integration_function/callback_sources0% | 0% | 0% | 25% | 74%
src/machines0% | 0% | 0% | 0% | 100%
lambda/python/cfn_example_functions0% | 0% | 0% | 0% | 100%
lambda/python/rs_integration_function/ddb0% | 0% | 0% | 0% | 100%
lambda/python/rs_integration_function/redshift_data0% | 0% | 0% | 0% | 100%
lambda/python/rs_integration_function/step_function0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
constructor()
in src/index.ts
163 13 3
def _handler()
in lambda/python/rs_integration_function/index.py
20 12 2
def get_callback_class_for_event()
in lambda/python/rs_integration_function/callback_sources/builder.py
15 8 2
def __init__()
in lambda/python/rs_integration_function/callback_sources/cfn_callback.py
11 7 2
def handler()
in lambda/python/cfn_example_functions/create_drop.py
24 5 2
def finished_data_api_request_record_handler()
in lambda/python/rs_integration_function/index.py
26 5 1
def handle_redshift_statement_invocation_event()
in lambda/python/rs_integration_function/index.py
11 4 1
def handle_redshift_statement_invocation()
in lambda/python/rs_integration_function/index.py
13 4 3
def is_statement_in_active_state()
in lambda/python/rs_integration_function/redshift_data/api.py
8 4 1
def handler()
in lambda/python/cfn_example_functions/manage_user.py
34 3 2
def __init__()
in lambda/python/cfn_example_functions/manage_user.py
15 3 10
def check_valid_identifier()
in lambda/python/cfn_example_functions/manage_user.py
3 3 3
def _get_password_sql()
in lambda/python/cfn_example_functions/manage_user.py
10 3 1
def send()
in lambda/python/cfn_example_functions/cfnresponse.py
26 3 6
def send()
in lambda/python/rs_integration_function/callback_sources/cfnresponse.py
26 3 6
def send_task_success()
in lambda/python/rs_integration_function/step_function/api.py
12 3 3
def send_task_failure()
in lambda/python/rs_integration_function/step_function/api.py
13 3 3
def get_latest_statement_name_for_execution_arn()
in lambda/python/rs_integration_function/ddb/ddb_state_table.py
20 3 2
constructor()
in src/machines/parallel_no_concurrency.ts
11 2 2
def make_from_dict()
in lambda/python/cfn_example_functions/manage_user.py
15 2 2