awslabs / aws-codepipeline-governance
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 18 units with 304 lines of code in units (26.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (30 lines of code)
    • 7 simple units (169 lines of code)
    • 10 very simple units (105 lines of code)
0% | 0% | 9% | 55% | 34%
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% | 9% | 55% | 34%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 9% | 55% | 34%
Most Complex Units
Top 18 most complex units
Unit# linesMcCabe index# params
30 12 1
18 8 2
def scan_for_stage()
in src/helper.py
31 8 2
def scan_dynamodb()
in src/dynamodb_helper.py
21 7 4
def scan_for_action()
in src/helper.py
14 7 2
def boto3_session()
in src/client_session_helper.py
21 6 3
def boto3_client()
in src/client_session_helper.py
22 6 5
def lambda_handler()
in src/main.py
42 6 2
11 5 2
def get_user_params()
in src/helper.py
12 5 2
def s3_download_file()
in src/s3_helper.py
20 4 4
def cleanup_temp()
in src/helper.py
7 3 1
25 2 4
def put_job_success()
in src/cp_helper.py
5 1 3
def put_job_failure()
in src/cp_helper.py
8 1 3
def assume_role()
in src/sts_helper.py
9 1 3
def __init__()
in src/custom_logging.py
6 1 1
def logger()
in src/custom_logging.py
2 1 1