aws-samples / end-2-end-3d-ml
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 36 units with 1,265 lines of code in units (71.8% of code).
    • 3 very long units (446 lines of code)
    • 4 long units (324 lines of code)
    • 9 medium size units (313 lines of code)
    • 6 small units (100 lines of code)
    • 14 very small units (82 lines of code)
35% | 25% | 24% | 7% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py35% | 25% | 24% | 7% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
a2d226% | 23% | 37% | 8% | 3%
container_training62% | 37% | 0% | 0% | 0%
docker62% | 37% | 0% | 0% | 0%
ROOT0% | 0% | 28% | 24% | 48%
container_inference/mm3d0% | 0% | 0% | 42% | 57%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def create_groundtruth_database()
in a2d2/a2d2_database.py
208 31 14
def main()
in container_training/train.py
119 18 0
def main()
in docker/train.py
119 18 0
def bbox2result_kitti()
in a2d2/a2d2_dataset.py
92 10 5
def bbox2result_kitti2d()
in a2d2/a2d2_dataset.py
88 11 5
def parse_args()
in container_training/train.py
72 6 0
def parse_args()
in docker/train.py
72 6 0
def convert_valid_bboxes()
in a2d2/a2d2_dataset.py
50 3 3
def evaluate()
in a2d2/a2d2_dataset.py
40 9 9
def create_kitti_info_file()
in a2d2/a2d2_converter.py
38 2 4
def show()
in a2d2/a2d2_dataset.py
37 6 5
def format_results()
in a2d2/a2d2_dataset.py
36 9 4
def get_ann_info()
in a2d2/a2d2_dataset.py
33 3 2
def _parse_coco_ann_info()
in a2d2/a2d2_database.py
30 7 1
def __init__()
in a2d2/a2d2_dataset.py
28 1 18
def undistort_image()
in a2d2_helpers.py
21 4 3
def get_data_info()
in a2d2/a2d2_dataset.py
20 2 2
def get_axes_of_a_view()
in a2d2_helpers.py
18 7 1
def crop_image_patch_v2()
in a2d2/a2d2_database.py
17 1 3
def _build_default_pipeline()
in a2d2/a2d2_dataset.py
17 2 1