aws-samples / aws-autonomous-driving-data-lake-image-extraction-pipeline-from-ros-bagfiles
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 1,151 units with 13,545 lines of code in units (66.8% of code).
    • 1 very complex units (154 lines of code)
    • 12 complex units (1,341 lines of code)
    • 69 medium complex units (3,295 lines of code)
    • 131 simple units (3,188 lines of code)
    • 938 very simple units (5,567 lines of code)
1% | 9% | 24% | 23% | 41%
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
py1% | 9% | 24% | 23% | 41%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
infrastructure/pillow-layer1% | 10% | 24% | 23% | 39%
object-detection0% | 0% | 33% | 0% | 66%
object-detection/ground_truth0% | 0% | 24% | 19% | 56%
infrastructure/select-labelling-imgs0% | 0% | 50% | 14% | 35%
infrastructure/process-queue-sync0% | 0% | 0% | 63% | 36%
service/app0% | 0% | 0% | 38% | 61%
infrastructure/bag-queue-proc0% | 0% | 0% | 60% | 40%
infrastructure/s3-upload-trigger0% | 0% | 0% | 0% | 100%
infrastructure/S3Batch0% | 0% | 0% | 0% | 100%
infrastructure0% | 0% | 0% | 0% | 100%
service0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _save()
in infrastructure/pillow-layer/python/PIL/TiffImagePlugin.py
154 59 3
def _setitem()
in infrastructure/pillow-layer/python/PIL/TiffImagePlugin.py
62 43 4
def _save()
in infrastructure/pillow-layer/python/PIL/JpegImagePlugin.py
124 43 3
def _save()
in infrastructure/pillow-layer/python/PIL/PngImagePlugin.py
129 43 5
def convert()
in infrastructure/pillow-layer/python/PIL/Image.py
115 42 6
def _bitmap()
in infrastructure/pillow-layer/python/PIL/BmpImagePlugin.py
149 42 3
def _seek()
in infrastructure/pillow-layer/python/PIL/GifImagePlugin.py
102 40 2
def _parse_jp2_header()
in infrastructure/pillow-layer/python/PIL/Jpeg2KImagePlugin.py
82 36 1
def _open()
in infrastructure/pillow-layer/python/PIL/ImImagePlugin.py
102 34 1
def _save()
in infrastructure/pillow-layer/python/PIL/PdfImagePlugin.py
141 30 4
def _save_all()
in infrastructure/pillow-layer/python/PIL/WebPImagePlugin.py
105 29 3
def get_value()
in infrastructure/pillow-layer/python/PIL/PdfParser.py
116 29 5
def _write_multiple_frames()
in infrastructure/pillow-layer/python/PIL/PngImagePlugin.py
114 26 4
def _open()
in infrastructure/pillow-layer/python/PIL/EpsImagePlugin.py
65 24 1
def APP()
in infrastructure/pillow-layer/python/PIL/JpegImagePlugin.py
77 23 2
def tobytes()
in infrastructure/pillow-layer/python/PIL/TiffImagePlugin.py
56 22 2
def autocontrast()
in infrastructure/pillow-layer/python/PIL/ImageOps.py
56 22 4
def open()
in infrastructure/pillow-layer/python/PIL/Image.py
62 22 3
def pilinfo()
in infrastructure/pillow-layer/python/PIL/features.py
79 21 2
def _open()
in infrastructure/pillow-layer/python/PIL/TgaImagePlugin.py
77 21 1