awslabs / aws-config-rdklib
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 45 units with 365 lines of code in units (76.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (37 lines of code)
    • 5 simple units (83 lines of code)
    • 39 very simple units (245 lines of code)
0% | 0% | 10% | 22% | 67%
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% | 10% | 22% | 67%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
rdklib0% | 0% | 24% | 12% | 62%
rdklib/util0% | 0% | 0% | 37% | 62%
rdklibtest0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def handle()
in rdklib/evaluator.py
37 13 3
def build_client()
in rdklib/clientfactory.py
9 8 2
def __eq__()
in rdklib/evaluation.py
10 7 2
def process_periodic_evaluations_list()
in rdklib/util/evaluations.py
18 6 4
def clean_up_old_evaluations()
in rdklib/util/evaluations.py
31 6 3
def process_evaluations()
in rdklib/util/external.py
15 6 3
def process_event_evaluations_list()
in rdklib/util/evaluations.py
13 5 4
def is_valid()
in rdklib/evaluation.py
14 5 1
11 5 4
def get_execution_role_arn()
in rdklib/configrule.py
11 4 2
def is_internal_error()
in rdklib/util/service.py
7 4 1
def get_assume_role_credentials()
in rdklib/clientfactory.py
15 4 1
8 4 3
def is_applicable_status()
in rdklib/util/service.py
6 3 2
6 3 2
def __init__()
in rdklib/evaluator.py
6 2 3
def init_event()
in rdklib/evaluator.py
7 2 2
def check_defined()
in rdklib/util/service.py
4 2 2
def is_applicable_resource_type()
in rdklib/util/service.py
4 2 2
3 2 1