awslabs / assisted-log-enabler-for-aws
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 37 units with 982 lines of code in units (81.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (397 lines of code)
    • 8 simple units (306 lines of code)
    • 23 very simple units (279 lines of code)
0% | 0% | 40% | 31% | 28%
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% | 40% | 31% | 28%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
subfunctions0% | 0% | 35% | 33% | 30%
ROOT0% | 0% | 96% | 0% | 3%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def assisted_log_enabler()
in assisted_log_enabler.py
78 23 0
def r53_cleanup()
in subfunctions/ALE_cleanup_single.py
73 16 0
def s3_logs()
in subfunctions/ALE_single_account.py
113 15 3
def dryrun_s3_logs()
in subfunctions/ALE_dryrun_multi.py
52 14 3
def dryrun_s3_logs()
in subfunctions/ALE_dryrun_single.py
37 13 2
def s3_cleanup()
in subfunctions/ALE_cleanup_single.py
44 13 0
def cloudtrail_cleanup()
in subfunctions/ALE_cleanup_single.py
36 9 0
def dryrun_flow_log_activator()
in subfunctions/ALE_dryrun_multi.py
40 7 3
def dryrun_route_53_query_logs()
in subfunctions/ALE_dryrun_multi.py
46 7 3
def eks_logging()
in subfunctions/ALE_single_account.py
41 7 1
def route_53_query_logs()
in subfunctions/ALE_single_account.py
47 7 3
def dryrun_flow_log_activator()
in subfunctions/ALE_dryrun_single.py
24 6 2
def dryrun_route_53_query_logs()
in subfunctions/ALE_dryrun_single.py
25 6 2
def flow_log_activator()
in subfunctions/ALE_single_account.py
47 6 3
def dryrun_eks_logging()
in subfunctions/ALE_dryrun_multi.py
29 5 2
def dryrun_eks_logging()
in subfunctions/ALE_dryrun_single.py
14 4 1
def vpcflow_cleanup()
in subfunctions/ALE_cleanup_single.py
31 4 0
def org_account_grab()
in subfunctions/ALE_dryrun_multi.py
14 3 0
def dryrun_check_cloudtrail()
in subfunctions/ALE_dryrun_single.py
14 3 1
def create_bucket()
in subfunctions/ALE_single_account.py
64 3 1