aws-samples / amazon-aurora-call-to-amazon-sagemaker-sample
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 4,230 units with 42,368 lines of code in units (62.2% of code).
    • 1 very complex units (185 lines of code)
    • 23 complex units (2,009 lines of code)
    • 204 medium complex units (8,788 lines of code)
    • 439 simple units (9,293 lines of code)
    • 3,563 very simple units (22,093 lines of code)
<1% | 4% | 20% | 21% | 52%
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% | 20% | 21% | 52%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
stk-sample/lambda/stk-player-events-loader-mysql<1% | 4% | 21% | 21% | 52%
stk-sample/lambda/stk-player-events-loader-pg0% | 8% | 15% | 25% | 50%
stk-sample/ec2/ec2_build0% | 0% | 0% | 0% | 100%
stk-sample/lambda/stk-player-events-filter0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def config()
in stk-sample/lambda/stk-player-events-loader-mysql/package/mysql/connector/abstracts.py
185 63 2
def lex()
in stk-sample/lambda/stk-player-events-loader-mysql/package/mysqlx/expr.py
110 49 1
def _build()
in stk-sample/lambda/stk-player-events-loader-pg/package/asn1crypto/core.py
162 48 9
def __init__()
in stk-sample/lambda/stk-player-events-loader-pg/package/asn1crypto/core.py
132 46 11
def _parse_children()
in stk-sample/lambda/stk-player-events-loader-pg/package/asn1crypto/core.py
106 40 2
def __init__()
in stk-sample/lambda/stk-player-events-loader-mysql/package/setuptools/_distutils/dist.py
66 37 2
def _validate_settings()
in stk-sample/lambda/stk-player-events-loader-mysql/package/mysqlx/__init__.py
74 37 1
def _ConvertFieldValuePair()
in stk-sample/lambda/stk-player-events-loader-mysql/package/google/protobuf/json_format.py
92 35 3
def validate_connection_attributes()
in stk-sample/lambda/stk-player-events-loader-mysql/package/mysqlx/__init__.py
88 34 1
def finalize_options()
in stk-sample/lambda/stk-player-events-loader-mysql/package/setuptools/_distutils/command/build_ext.py
92 33 1
def get_connection()
in stk-sample/lambda/stk-player-events-loader-mysql/package/mysqlx/connection.py
118 31 2
def switch_to_ssl()
in stk-sample/lambda/stk-player-events-loader-mysql/package/mysql/connector/network.py
87 30 8
def _AddIsInitializedMethod()
in stk-sample/lambda/stk-player-events-loader-mysql/package/google/protobuf/internal/python_message.py
60 30 2
def execute()
in stk-sample/lambda/stk-player-events-loader-mysql/package/mysqlx/statement.py
93 29 1
def _parse_children()
in stk-sample/lambda/stk-player-events-loader-pg/package/asn1crypto/core.py
81 29 2
def process_template_line()
in stk-sample/lambda/stk-player-events-loader-mysql/package/setuptools/_distutils/filelist.py
56 28 2
def process_template_line()
in stk-sample/lambda/stk-player-events-loader-mysql/package/setuptools/command/egg_info.py
55 28 2
def set_ssl()
in stk-sample/lambda/stk-player-events-loader-mysql/package/mysqlx/connection.py
77 28 8
def convert_paramstyle()
in stk-sample/lambda/stk-player-events-loader-pg/package/pg8000/dbapi.py
116 28 3
def copy_file()
in stk-sample/lambda/stk-player-events-loader-mysql/package/setuptools/_distutils/file_util.py
46 27 8