aws-samples / no-tears-cluster
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 1,806 units with 31,138 lines of code in units (63.5% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (717 lines of code)
    • 64 medium complex units (2,350 lines of code)
    • 203 simple units (3,806 lines of code)
    • 1,534 very simple units (24,265 lines of code)
0% | 2% | 7% | 12% | 77%
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% | 2% | 7% | 12% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pcluster0% | 96% | 0% | 0% | 3%
functions/source/c9bootstrap/requests0% | 4% | 23% | 23% | 48%
functions/source/c9InstanceProfile/requests0% | 4% | 23% | 23% | 48%
functions/source/c9bootstrap/urllib30% | 1% | 11% | 27% | 59%
functions/source/c9InstanceProfile/urllib30% | 1% | 11% | 27% | 59%
functions/source/c9bootstrap/idna0% | 0% | 1% | 1% | 96%
functions/source/c9InstanceProfile/idna0% | 0% | 1% | 1% | 96%
functions/source/c9bootstrap/chardet0% | 0% | 14% | 25% | 60%
functions/source/c9InstanceProfile/chardet0% | 0% | 14% | 25% | 60%
functions/source/c9bootstrap/crhelper0% | 0% | 0% | 23% | 76%
functions/source/c9InstanceProfile/crhelper0% | 0% | 0% | 23% | 76%
functions/source/c9bootstrap0% | 0% | 0% | 28% | 71%
functions/source/c9keypair0% | 0% | 0% | 43% | 56%
functions/source/c9InstanceProfile0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
functions/source/c9bootstrap/certifi0% | 0% | 0% | 0% | 100%
functions/source/c9InstanceProfile/certifi0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def __init__()
in pcluster/pcluster_stack.py
427 26 4
def parse_url()
in functions/source/c9bootstrap/urllib3/util/url.py
53 26 1
def send()
in functions/source/c9bootstrap/requests/adapters.py
92 26 7
def parse_url()
in functions/source/c9InstanceProfile/urllib3/util/url.py
53 26 1
def send()
in functions/source/c9InstanceProfile/requests/adapters.py
92 26 7
def valid_contexto()
in functions/source/c9bootstrap/idna/core.py
32 23 3
def build_digest_header()
in functions/source/c9bootstrap/requests/auth.py
80 23 3
def valid_contexto()
in functions/source/c9InstanceProfile/idna/core.py
32 23 3
def build_digest_header()
in functions/source/c9InstanceProfile/requests/auth.py
80 23 3
def print_()
in functions/source/c9bootstrap/urllib3/packages/six.py
52 22 2
def feed()
in functions/source/c9bootstrap/chardet/universaldetector.py
66 22 2
def resolve_redirects()
in functions/source/c9bootstrap/requests/sessions.py
69 22 10
def print_()
in functions/source/c9InstanceProfile/urllib3/packages/six.py
52 22 2
def feed()
in functions/source/c9InstanceProfile/chardet/universaldetector.py
66 22 2
def resolve_redirects()
in functions/source/c9InstanceProfile/requests/sessions.py
69 22 10
def check_bidi()
in functions/source/c9bootstrap/idna/core.py
44 21 2
def check_bidi()
in functions/source/c9InstanceProfile/idna/core.py
44 21 2
def match_hostname()
in functions/source/c9bootstrap/urllib3/packages/ssl_match_hostname/_implementation.py
49 20 2
def prepare_url()
in functions/source/c9bootstrap/requests/models.py
55 20 3
def match_hostname()
in functions/source/c9InstanceProfile/urllib3/packages/ssl_match_hostname/_implementation.py
49 20 2