facebookresearch / c3dpo_nrsfm
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 2,200 lines of code in units (72.0% of code).
    • 0 very long units (0 lines of code)
    • 7 long units (501 lines of code)
    • 25 medium size units (790 lines of code)
    • 36 small units (513 lines of code)
    • 71 very small units (396 lines of code)
0% | 22% | 35% | 23% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 22% | 35% | 23% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 38% | 26% | 20% | 14%
tools0% | 18% | 37% | 17% | 26%
dataset0% | 0% | 52% | 39% | 8%
visuals0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def show_projections()
in tools/vis_utils.py
91 20 14
def run_phi()
in model.py
88 21 4
def plot_stats()
in tools/stats.py
71 18 5
def run_training()
in experiment.py
68 15 1
def __init__()
in model.py
67 4 6
def forward()
in model.py
63 10 6
def visualize()
in model.py
53 12 6
def dataset_zoo()
in dataset/dataset_zoo.py
47 13 3
def trainvalidate()
in experiment.py
44 10 11
def init_optimizer()
in experiment.py
43 10 3
def matplot_plot_point_cloud()
in tools/vis_utils.py
41 8 6
38 12 3
def calc_stress_err()
in dataset/eval_zoo.py
38 8 5
def init_model()
in experiment.py
37 8 4
def update()
in tools/stats.py
36 10 5
def cache_preds()
in tools/cache_preds.py
33 12 5
def visdom_plot_pointclouds()
in tools/vis_utils.py
32 6 9
def run_demo()
in demo.py
32 1 0
def concatenate_cache()
in tools/cache_preds.py
31 23 1
31 5 1