facebookresearch / nonrigid_nerf
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 58 units with 2,677 lines of code in units (74.9% of code).
    • 5 very long units (1,569 lines of code)
    • 5 long units (358 lines of code)
    • 13 medium size units (466 lines of code)
    • 13 small units (190 lines of code)
    • 22 very small units (94 lines of code)
58% | 13% | 17% | 7% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py58% | 13% | 17% | 7% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT58% | 13% | 17% | 7% | 3%
llff_preprocessing0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
498 92 1
def free_viewpoint_rendering()
in free_viewpoint_rendering.py
383 63 1
def _setup_nonrigid_nerf_network()
in free_viewpoint_rendering.py
334 48 2
221 1 0
133 30 3
def __init__()
in run_nerf_helpers.py
100 22 5
81 15 1
def forward()
in run_nerf_helpers.py
65 18 3
58 5 1
def undistort()
in preprocess.py
54 7 1
def _ray_mesh()
in run_nerf_helpers.py
44 4 1
43 4 1
def _delta_mesh()
in run_nerf_helpers.py
43 3 2
41 5 6
41 12 2
38 10 2
def backup()
in train.py
36 8 1
def sample_pdf()
in run_nerf_helpers.py
35 4 5
34 7 2
33 3 5