aws-samples / cdk-glue-orchestrate-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 25 units with 426 lines of code in units (60.9% 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)
    • 2 simple units (136 lines of code)
    • 23 very simple units (290 lines of code)
0% | 0% | 0% | 31% | 68%
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% | 31% | 68%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
redshift_benchmark0% | 0% | 0% | 59% | 40%
scripts/glue_script0% | 0% | 0% | 19% | 80%
redshift_benchmark/lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def __init__()
in redshift_benchmark/redshiftBenchmarkStack.py
113 6 16
def run_parallel_task()
in scripts/glue_script/run_redshift_benchmark.py
23 6 1
def rs_sql_task()
in redshift_benchmark/redshiftBenchmarkStack.py
51 4 4
def rs_select()
in scripts/glue_script/run_redshift_benchmark.py
20 3 5
def run_sequential_task()
in scripts/glue_script/run_redshift_benchmark.py
14 3 1
def rs_con_pool()
in scripts/glue_script/run_redshift_benchmark.py
21 2 1
def close_pool()
in scripts/glue_script/run_redshift_benchmark.py
3 2 1
def __init__()
in redshift_benchmark/lib/cdkVPCStack.py
22 1 4
def get_vpc()
in redshift_benchmark/lib/cdkVPCStack.py
2 1 1
def get_vpc_public_subnet_ids()
in redshift_benchmark/lib/cdkVPCStack.py
4 1 1
def get_vpc_private_subnet_ids()
in redshift_benchmark/lib/cdkVPCStack.py
4 1 1
def __init__()
in redshift_benchmark/lib/cdkInitialAssets.py
5 1 5
def get_bucket()
in redshift_benchmark/lib/cdkInitialAssets.py
2 1 1
def __init__()
in redshift_benchmark/lib/cdkGlueStack.py
35 1 15
def __init__()
in redshift_benchmark/lib/cdkGlueStack.py
31 1 7
def __init__()
in redshift_benchmark/lib/cdkRedshiftStack.py
5 1 0
def get_security_group()
in redshift_benchmark/lib/cdkRedshiftStack.py
2 1 1
def get_cluster()
in redshift_benchmark/lib/cdkRedshiftStack.py
2 1 1
def get_role_arn()
in redshift_benchmark/lib/cdkRedshiftStack.py
2 1 1
def run_benchmark_query()
in redshift_benchmark/redshiftBenchmarkStack.py
27 1 3