awslabs / rds-snapshot-tool
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 448 lines of code in units (69.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (83 lines of code)
    • 11 simple units (252 lines of code)
    • 8 very simple units (113 lines of code)
0% | 0% | 18% | 56% | 25%
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% | 18% | 56% | 25%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambda0% | 0% | 41% | 20% | 38%
lambda/copy_snapshots_dest_rds0% | 0% | 0% | 100% | 0%
lambda/take_snapshots_rds0% | 0% | 0% | 100% | 0%
lambda/delete_old_snapshots_no_x_account_rds0% | 0% | 0% | 100% | 0%
lambda/delete_old_snapshots_dest_rds0% | 0% | 0% | 100% | 0%
lambda/delete_old_snapshots_rds0% | 0% | 0% | 100% | 0%
lambda/share_snapshots_rds0% | 0% | 0% | 100% | 0%
lambda/copy_snapshots_no_x_account_rds0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_own_snapshots_source()
in lambda/snapshots_tool_utils.py
22 16 3
def filter_instances()
in lambda/snapshots_tool_utils.py
15 14 3
def get_own_snapshots_no_x_account()
in lambda/snapshots_tool_utils.py
18 12 3
def get_shared_snapshots()
in lambda/snapshots_tool_utils.py
14 11 2
def get_own_snapshots_dest()
in lambda/snapshots_tool_utils.py
14 11 2
def lambda_handler()
in lambda/delete_old_snapshots_no_x_account_rds/lambda_function.py
36 10 2
def search_tag_shared()
in lambda/snapshots_tool_utils.py
10 10 1
def lambda_handler()
in lambda/delete_old_snapshots_dest_rds/lambda_function.py
33 10 2
def lambda_handler()
in lambda/delete_old_snapshots_rds/lambda_function.py
26 7 2
def lambda_handler()
in lambda/share_snapshots_rds/lambda_function.py
25 7 2
def search_tag_copydbsnapshot()
in lambda/snapshots_tool_utils.py
6 7 1
def search_tag_created()
in lambda/snapshots_tool_utils.py
6 7 1
def lambda_handler()
in lambda/take_snapshots_rds/lambda_function.py
41 6 2
def lambda_handler()
in lambda/copy_snapshots_dest_rds/lambda_function.py
50 6 2
def search_tag_copied()
in lambda/snapshots_tool_utils.py
8 6 1
def get_latest_snapshot_ts()
in lambda/snapshots_tool_utils.py
11 6 2
def requires_backup()
in lambda/snapshots_tool_utils.py
10 5 3
def paginate_api_call()
in lambda/snapshots_tool_utils.py
9 5 5
def lambda_handler()
in lambda/copy_snapshots_no_x_account_rds/lambda_function.py
37 4 2
def get_timestamp()
in lambda/snapshots_tool_utils.py
9 4 2