aws-samples / s3-object-lambda-workshop
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 23,908 units with 201,448 lines of code in units (47.8% of code).
    • 25 very complex units (5,817 lines of code)
    • 120 complex units (10,678 lines of code)
    • 844 medium complex units (33,387 lines of code)
    • 1,625 simple units (33,836 lines of code)
    • 21,294 very simple units (117,730 lines of code)
2% | 5% | 16% | 16% | 58%
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
py2% | 5% | 17% | 17% | 56%
c30% | 18% | 15% | 10% | 25%
pyx5% | 6% | 19% | 18% | 50%
h0% | 1% | 12% | 12% | 74%
pxi0% | 0% | 7% | 14% | 78%
hpp0% | 0% | 6% | 3% | 90%
cc0% | 0% | 0% | 51% | 48%
pyi0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
amplify/backend/function2% | 5% | 16% | 16% | 58%
src/table0% | 0% | 0% | 0% | 100%
src/create0% | 0% | 0% | 0% | 100%
src/edit0% | 0% | 0% | 0% | 100%
src/list0% | 0% | 0% | 0% | 100%
src/navigation0% | 0% | 0% | 0% | 100%
src/navbar0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def analyzeline()
in amplify/backend/function/iamxawswrangler/lib/python/numpy/f2py/crackfortran.py
529 179 3
def analyzevars()
in amplify/backend/function/iamxawswrangler/lib/python/numpy/f2py/crackfortran.py
335 161 1
int parse_iso_8601_datetime()
in amplify/backend/function/iamxawswrangler/lib/python/pandas/_libs/tslibs/src/datetime/np_datetime_strings.c
361 113 6
def genfromtxt()
in amplify/backend/function/iamxawswrangler/lib/python/numpy/lib/npyio.py
414 108 13
int tokenize_bytes()
in amplify/backend/function/iamxawswrangler/lib/python/pandas/_libs/src/parser/tokenizer.c
329 99 3
def _iter()
in amplify/backend/function/iamxawswrangler/lib/python/dateutil/rrule.py
224 97 1
void Object_beginTypeContext()
in amplify/backend/function/iamxawswrangler/lib/python/pandas/_libs/src/ujson/python/objToJSON.c
447 92 2
pyx
def array_strptime()
in amplify/backend/function/iamxawswrangler/lib/python/pandas/_libs/tslibs/strptime.pyx
221 71 4
def updatevars()
in amplify/backend/function/iamxawswrangler/lib/python/numpy/f2py/crackfortran.py
144 69 4
pyx
def maybe_convert_objects()
in amplify/backend/function/iamxawswrangler/lib/python/pandas/_libs/lib.pyx
275 68 10
def build_extension()
in amplify/backend/function/iamxawswrangler/lib/python/numpy/distutils/command/build_ext.py
211 63 2
JSOBJ FASTCALL_MSVC decode_numeric()
in amplify/backend/function/iamxawswrangler/lib/python/pandas/_libs/src/ujson/lib/ultrajsondec.c
187 62 1
JSOBJ FASTCALL_MSVC decode_string()
in amplify/backend/function/iamxawswrangler/lib/python/pandas/_libs/src/ujson/lib/ultrajsondec.c
251 62 1
pyx
def tz_localize_to_utc()
in amplify/backend/function/iamxawswrangler/lib/python/pandas/_libs/tslibs/tzconversion.pyx
169 62 4
def loadtxt()
in amplify/backend/function/iamxawswrangler/lib/python/numpy/lib/npyio.py
200 60 13
def build_a_library()
in amplify/backend/function/iamxawswrangler/lib/python/numpy/distutils/command/build_clib.py
202 60 4
def run_compile()
in amplify/backend/function/iamxawswrangler/lib/python/numpy/f2py/f2py2e.py
148 58 0
def scaninputline()
in amplify/backend/function/iamxawswrangler/lib/python/numpy/f2py/f2py2e.py
145 57 1
pyx
def infer_dtype()
in amplify/backend/function/iamxawswrangler/lib/python/pandas/_libs/lib.pyx
106 57 2
def _read_tzfile()
in amplify/backend/function/iamxawswrangler/lib/python/dateutil/tz/tz.py
102 56 2