aws-samples / aws-autonomous-driving-data-lake-image-extraction-pipeline-from-ros-bagfiles
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 1,151 units with 13,545 lines of code in units (66.8% of code).
    • 13 very long units (1,573 lines of code)
    • 32 long units (2,070 lines of code)
    • 123 medium size units (3,971 lines of code)
    • 176 small units (2,538 lines of code)
    • 807 very small units (3,393 lines of code)
11% | 15% | 29% | 18% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py11% | 15% | 29% | 18% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
infrastructure/pillow-layer12% | 13% | 29% | 18% | 25%
object-detection0% | 62% | 9% | 28% | 0%
object-detection/ground_truth0% | 32% | 36% | 12% | 19%
infrastructure/process-queue-sync0% | 63% | 34% | 0% | 1%
infrastructure/select-labelling-imgs0% | 50% | 20% | 14% | 14%
service/app0% | 27% | 40% | 13% | 18%
infrastructure/bag-queue-proc0% | 0% | 60% | 40% | 0%
infrastructure/S3Batch0% | 0% | 0% | 82% | 17%
infrastructure0% | 0% | 0% | 100% | 0%
infrastructure/s3-upload-trigger0% | 0% | 0% | 0% | 100%
service0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _save()
in infrastructure/pillow-layer/python/PIL/TiffImagePlugin.py
154 59 3
def _bitmap()
in infrastructure/pillow-layer/python/PIL/BmpImagePlugin.py
149 42 3
def _save()
in infrastructure/pillow-layer/python/PIL/PdfImagePlugin.py
141 30 4
def _save()
in infrastructure/pillow-layer/python/PIL/PngImagePlugin.py
129 43 5
def _save()
in infrastructure/pillow-layer/python/PIL/JpegImagePlugin.py
124 43 3
def _setup()
in infrastructure/pillow-layer/python/PIL/TiffImagePlugin.py
121 14 1
def get_value()
in infrastructure/pillow-layer/python/PIL/PdfParser.py
116 29 5
def convert()
in infrastructure/pillow-layer/python/PIL/Image.py
115 42 6
def _write_multiple_frames()
in infrastructure/pillow-layer/python/PIL/PngImagePlugin.py
114 26 4
def _save_all()
in infrastructure/pillow-layer/python/PIL/WebPImagePlugin.py
105 29 3
def _seek()
in infrastructure/pillow-layer/python/PIL/GifImagePlugin.py
102 40 2
def _open()
in infrastructure/pillow-layer/python/PIL/ImImagePlugin.py
102 34 1
def load()
in infrastructure/pillow-layer/python/PIL/ImageFile.py
101 21 1
def train()
in object-detection/train_yolov3.py
88 19 6
def _parse_jp2_header()
in infrastructure/pillow-layer/python/PIL/Jpeg2KImagePlugin.py
82 36 1
def pilinfo()
in infrastructure/pillow-layer/python/PIL/features.py
79 21 2
def parse_args()
in object-detection/train_yolov3.py
77 1 0
def _open()
in infrastructure/pillow-layer/python/PIL/TgaImagePlugin.py
77 21 1
def APP()
in infrastructure/pillow-layer/python/PIL/JpegImagePlugin.py
77 23 2
def export_json_file()
in infrastructure/process-queue-sync/process-queue-sync.py
74 10 3