aws-quickstart / quickstart-taskcat-ci
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 871 units with 15,400 lines of code in units (65.8% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (89 lines of code)
    • 35 medium complex units (1,380 lines of code)
    • 100 simple units (1,892 lines of code)
    • 735 very simple units (12,039 lines of code)
0% | <1% | 8% | 12% | 78%
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% | <1% | 8% | 12% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
functions/source/requests0% | 4% | 24% | 21% | 49%
functions/source/urllib3/contrib0% | 0% | 16% | 37% | 45%
functions/source/urllib30% | 0% | 11% | 23% | 64%
functions/source/idna0% | 0% | 1% | 1% | 96%
functions/source/chardet0% | 0% | 14% | 24% | 61%
functions/source/urllib3/util0% | 0% | 17% | 30% | 51%
functions/source/urllib3/packages0% | 0% | 15% | 11% | 72%
functions/source0% | 0% | 0% | 13% | 86%
functions/source/chardet/cli0% | 0% | 0% | 45% | 54%
functions/source/certifi0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def send()
in functions/source/requests/adapters.py
89 26 7
def valid_contexto()
in functions/source/idna/core.py
32 23 3
def urlopen()
in functions/source/urllib3/contrib/appengine.py
74 23 9
def build_digest_header()
in functions/source/requests/auth.py
80 23 3
def increment()
in functions/source/urllib3/util/retry.py
47 22 7
def print_()
in functions/source/urllib3/packages/six.py
50 22 2
def feed()
in functions/source/chardet/universaldetector.py
66 22 2
def resolve_redirects()
in functions/source/requests/sessions.py
69 22 10
def check_bidi()
in functions/source/idna/core.py
44 21 2
def urlopen()
in functions/source/urllib3/connectionpool.py
115 21 14
def prepare_url()
in functions/source/requests/models.py
55 20 3
def should_bypass_proxies()
in functions/source/requests/utils.py
32 19 2
def uts46_remap()
in functions/source/idna/core.py
25 18 3
def ssl_wrap_socket()
in functions/source/urllib3/util/ssl_.py
36 18 10
def _read_callback()
in functions/source/urllib3/contrib/securetransport.py
41 16 3
def guess_json_utf()
in functions/source/requests/utils.py
22 16 1
def feed()
in functions/source/chardet/hebrewprober.py
18 15 2
def feed()
in functions/source/chardet/sbcharsetprober.py
37 15 2
def iter_content()
in functions/source/requests/models.py
29 15 3
def valid_contextj()
in functions/source/idna/core.py
32 14 2