aws-quickstart / quickstart-redhat-openshift
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 3,989 units with 43,542 lines of code in units (64.5% of code).
    • 1 very complex units (128 lines of code)
    • 18 complex units (1,962 lines of code)
    • 115 medium complex units (5,403 lines of code)
    • 345 simple units (7,677 lines of code)
    • 3,510 very simple units (28,372 lines of code)
<1% | 4% | 12% | 17% | 65%
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
py<1% | 4% | 12% | 17% | 65%
h0% | 0% | 27% | 28% | 43%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
functions/source/KeyGen<1% | 6% | 14% | 20% | 58%
functions/source/DeleteBucketContents0% | <1% | 7% | 12% | 78%
functions/source/ACMCert0% | 79% | 0% | 0% | 20%
functions/source/OpenShiftResource0% | 0% | 35% | 18% | 46%
scripts/scaling/aws_openshift_quickstart0% | 0% | 25% | 28% | 46%
functions/source/CleanupPV0% | 0% | 0% | 66% | 33%
functions/source/UnSubscribe0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lex()
in functions/source/KeyGen/pycparser/ply/lex.py
128 54 6
def _build()
in functions/source/KeyGen/asn1crypto/core.py
156 46 9
def lr_parse_table()
in functions/source/KeyGen/pycparser/ply/yacc.py
139 41 1
def __init__()
in functions/source/KeyGen/asn1crypto/core.py
116 41 10
def _parse_children()
in functions/source/KeyGen/asn1crypto/core.py
105 40 2
def parsegen()
in functions/source/KeyGen/pycparser/ply/cpp.py
107 38 3
def new_primitive_type()
in functions/source/KeyGen/cffi/backend_ctypes.py
137 36 2
def _generate_cpy_function_decl()
in functions/source/KeyGen/cffi/recompiler.py
132 35 3
def handler()
in functions/source/ACMCert/lambda_function.py
104 30 2
def new_array_type()
in functions/source/KeyGen/cffi/backend_ctypes.py
106 29 3
def _parse_children()
in functions/source/KeyGen/asn1crypto/core.py
81 29 2
def _parse_constant()
in functions/source/KeyGen/cffi/cparser.py
49 28 3
def parse_url()
in functions/source/DeleteBucketContents/urllib3/util/url.py
53 26 1
def send()
in functions/source/DeleteBucketContents/requests/adapters.py
92 26 7
def _struct_ctx()
in functions/source/KeyGen/cffi/recompiler.py
84 26 5
def new_pointer_type()
in functions/source/KeyGen/cffi/backend_ctypes.py
84 26 2
def complete_struct_or_union()
in functions/source/KeyGen/cffi/backend_ctypes.py
103 26 8
def _make_ffi_library()
in functions/source/KeyGen/cffi/api.py
110 26 3
def yacc()
in functions/source/KeyGen/pycparser/ply/yacc.py
204 26 13
def add_production()
in functions/source/KeyGen/pycparser/ply/yacc.py
60 25 6