aws-samples / aws-comparing-algorithms-performance-mlops-cdk
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 22,127 units with 187,233 lines of code in units (70.1% of code).
    • 8 very complex units (1,304 lines of code)
    • 58 complex units (4,841 lines of code)
    • 507 medium complex units (21,758 lines of code)
    • 1,632 simple units (34,155 lines of code)
    • 19,922 very simple units (125,175 lines of code)
<1% | 2% | 11% | 18% | 66%
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% | 2% | 11% | 18% | 66%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
functions/predictionLambda<1% | 2% | 12% | 18% | 65%
functions/cleanupLambda<1% | 2% | 11% | 18% | 65%
functions/describeEndpointLambda<1% | 2% | 11% | 18% | 65%
functions/invokeStateLambda<1% | 2% | 11% | 18% | 65%
functions/bucketFolderCreator0% | <1% | 8% | 11% | 79%
cdk-app/scripts0% | 0% | 100% | 0% | 0%
cdk-app/lib0% | 0% | 0% | 0% | 100%
functions/comparisonLambda0% | 0% | 0% | 0% | 100%
functions/startLambda0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _iter()
in functions/invokeStateLambda/dateutil/rrule.py
224 97 1
def _iter()
in functions/describeEndpointLambda/dateutil/rrule.py
224 97 1
def _iter()
in functions/predictionLambda/dateutil/rrule.py
224 97 1
def _iter()
in functions/cleanupLambda/dateutil/rrule.py
224 97 1
def _read_tzfile()
in functions/invokeStateLambda/dateutil/tz/tz.py
102 56 2
def _read_tzfile()
in functions/describeEndpointLambda/dateutil/tz/tz.py
102 56 2
def _read_tzfile()
in functions/predictionLambda/dateutil/tz/tz.py
102 56 2
def _read_tzfile()
in functions/cleanupLambda/dateutil/tz/tz.py
102 56 2
def _parse_numeric_token()
in functions/invokeStateLambda/dateutil/parser/_parser.py
88 46 7
def _parse_numeric_token()
in functions/describeEndpointLambda/dateutil/parser/_parser.py
88 46 7
def _parse_numeric_token()
in functions/predictionLambda/dateutil/parser/_parser.py
88 46 7
def _parse_numeric_token()
in functions/cleanupLambda/dateutil/parser/_parser.py
88 46 7
def _parse_rfc()
in functions/invokeStateLambda/dateutil/rrule.py
114 41 10
def _parse_rfc()
in functions/describeEndpointLambda/dateutil/rrule.py
114 41 10
def _parse_rfc()
in functions/predictionLambda/dateutil/rrule.py
114 41 10
def _parse_rfc()
in functions/cleanupLambda/dateutil/rrule.py
114 41 10
def resolve_ymd()
in functions/invokeStateLambda/dateutil/parser/_parser.py
62 40 3
def resolve_ymd()
in functions/describeEndpointLambda/dateutil/parser/_parser.py
62 40 3
def resolve_ymd()
in functions/predictionLambda/dateutil/parser/_parser.py
62 40 3
def resolve_ymd()
in functions/cleanupLambda/dateutil/parser/_parser.py
62 40 3