apple / ARKitScenes
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 139 units with 1,482 lines of code in units (61.6% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (88 lines of code)
    • 16 medium size units (508 lines of code)
    • 32 small units (444 lines of code)
    • 90 very small units (442 lines of code)
0% | 5% | 34% | 29% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 5% | 34% | 29% | 29%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
depth_upsampling0% | 40% | 14% | 32% | 12%
threedod/benchmark_scripts/utils0% | 0% | 52% | 23% | 23%
depth_upsampling/logs0% | 0% | 89% | 0% | 10%
depth_upsampling/models/mspf0% | 0% | 22% | 23% | 54%
threedod/benchmark_scripts0% | 0% | 17% | 48% | 34%
ROOT0% | 0% | 64% | 30% | 4%
depth_upsampling/losses0% | 0% | 31% | 14% | 54%
depth_upsampling/models/msg0% | 0% | 37% | 32% | 30%
depth_upsampling/transfroms0% | 0% | 0% | 51% | 48%
depth_upsampling/models0% | 0% | 0% | 72% | 27%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in depth_upsampling/train.py
88 12 1
def extract_gt()
in threedod/benchmark_scripts/utils/tenFpsDataLoader.py
48 5 1
def __init__()
in depth_upsampling/models/mspf/MultiscaleConvDepthEncoder.py
46 2 2
def __getitem__()
in threedod/benchmark_scripts/utils/tenFpsDataLoader.py
43 7 2
def download_data()
in download_data.py
42 10 6
def eval_log()
in depth_upsampling/logs/eval.py
41 6 4
def compute_metrics()
in threedod/benchmark_scripts/utils/eval_utils.py
41 16 1
def sample_vis()
in depth_upsampling/sample_vis.py
32 7 4
def polygon_clip()
in threedod/benchmark_scripts/utils/box_utils.py
30 7 2
def create_gradient_log_loss_4_scales()
in depth_upsampling/losses/gradient_loss.py
27 1 3
def train_log()
in depth_upsampling/logs/train.py
25 6 5
def check_file_type()
in threedod/benchmark_scripts/show_3d_bbox_annotation.py
24 7 1
def eulerAnglesToRotationMatrix()
in threedod/benchmark_scripts/utils/rotation.py
24 1 1
def get_lines()
in threedod/benchmark_scripts/utils/visual_utils.py
22 2 4
def __init__()
in depth_upsampling/models/msg/msg.py
21 4 2
def line_actor()
in threedod/benchmark_scripts/show_3d_bbox_annotation.py
21 3 1
def points_in_boxes()
in threedod/benchmark_scripts/utils/box_utils.py
21 2 2
def raw_files()
in download_data.py
20 10 2
def __init__()
in depth_upsampling/models/mspf/blocks/multi_scale_depth.py
19 4 10
def forward()
in depth_upsampling/models/msg/msg.py
18 3 2