aws-samples / amazon-rekognition-serverless-large-scale-image-and-video-processing
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 105 units with 1,883 lines of code in units (92.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (158 lines of code)
    • 10 simple units (506 lines of code)
    • 89 very simple units (1,219 lines of code)
0% | 0% | 8% | 26% | 64%
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% | 0% | 9% | 30% | 59%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 9% | 30% | 59%
rekognition-pipeline/lambda/itemprocessor0% | 0% | 57% | 0% | 42%
rekognition-pipeline/lambda/jobresultprocessor0% | 0% | 46% | 0% | 53%
rekognition-pipeline/lambda/asyncprocessor0% | 0% | 0% | 78% | 21%
rekognition-pipeline/lambda/syncprocessor0% | 0% | 0% | 58% | 41%
rekognition-pipeline/lambda/helper0% | 0% | 0% | 10% | 89%
rekognition-pipeline/lib0% | 0% | 0% | 0% | 100%
rekognition-pipeline/lambda/s3batchprocessor0% | 0% | 0% | 0% | 100%
rekognition-pipeline/lambda/s3processor0% | 0% | 0% | 0% | 100%
rekognition-pipeline/lambda/s3FolderCreator0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def getJobResults()
in rekognition-pipeline/lambda/jobresultprocessor/lambda_function.py
39 14 2
def getJobResults()
in src/jobresultsproc.py
39 14 2
def processRecord()
in rekognition-pipeline/lambda/itemprocessor/lambda_function.py
24 13 3
def processRecord()
in src/itemproc.py
24 13 3
def lambda_handler()
in rekognition-pipeline/lambda/itemprocessor/lambda_function.py
16 11 2
def lambda_handler()
in src/itemproc.py
16 11 2
def processItems()
in rekognition-pipeline/lambda/asyncprocessor/lambda_function.py
36 8 3
def processRequest()
in rekognition-pipeline/lambda/asyncprocessor/lambda_function.py
38 8 1
def processItems()
in src/asyncproc.py
36 8 3
def processRequest()
in src/asyncproc.py
38 8 1
def getFileNames()
in rekognition-pipeline/lambda/helper/python/helper.py
27 7 5
def getFileNames()
in src/helper.py
27 7 5
def startJob()
in rekognition-pipeline/lambda/asyncprocessor/lambda_function.py
95 6 6
def callRekognition()
in rekognition-pipeline/lambda/syncprocessor/lambda_function.py
57 6 3
def callRekognition()
in src/syncproc.py
57 6 3
def startJob()
in src/asyncproc.py
95 6 6
def processRequest()
in rekognition-pipeline/lambda/itemprocessor/lambda_function.py
22 5 1
def getItems()
in rekognition-pipeline/lambda/helper/python/helper.py
10 5 3
def processRequest()
in src/itemproc.py
22 5 1
def getItems()
in src/helper.py
10 5 3