facebookresearch / c3dm
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 337 units with 5,656 lines of code in units (64.8% of code).
    • 4 very long units (561 lines of code)
    • 16 long units (1,174 lines of code)
    • 51 medium size units (1,560 lines of code)
    • 94 small units (1,365 lines of code)
    • 172 very small units (996 lines of code)
9% | 20% | 27% | 24% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py9% | 20% | 27% | 24% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
c3dm23% | 15% | 24% | 23% | 13%
c3dm/tools3% | 15% | 30% | 25% | 25%
c3dm/dataset0% | 48% | 26% | 22% | 2%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def visualize()
in c3dm/model.py
231 17 6
def forward()
in c3dm/c3dpo.py
121 21 10
def __init__()
in c3dm/hypercolumnet.py
108 5 24
def _normalize_tabular_data()
in c3dm/tools/tabulate.py
101 22 3
def eval_freicars()
in c3dm/dataset/eval_zoo.py
97 6 5
def __init__()
in c3dm/c3dpo.py
85 5 8
def show_projections()
in c3dm/tools/vis_utils.py
84 3 15
def __init__()
in c3dm/model.py
84 3 2
def eval_zoo()
in c3dm/dataset/eval_zoo.py
82 1 2
def run_training()
in c3dm/experiment.py
81 7 1
def visdom_plotly_pointclouds()
in c3dm/tools/vis_utils.py
80 4 13
def plot_stats()
in c3dm/tools/stats.py
77 21 5
def eval_p3d()
in c3dm/dataset/eval_zoo.py
76 7 5
def __getitem__()
in c3dm/dataset/keypoints_dataset.py
74 7 2
def dataset_zoo()
in c3dm/dataset/dataset_zoo.py
67 4 24
def visdom_plotly_cameras()
in c3dm/tools/vis_utils.py
63 3 11
def tabulate()
in c3dm/tools/tabulate.py
59 24 2
def eval_florence()
in c3dm/dataset/eval_zoo.py
58 5 4
def _main()
in c3dm/tools/tabulate.py
54 3 0
def init_model()
in c3dm/experiment.py
53 3 4