facebookresearch / neuralvolumes
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 55 units with 714 lines of code in units (78.4% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (135 lines of code)
    • 8 medium size units (224 lines of code)
    • 13 small units (211 lines of code)
    • 32 very small units (144 lines of code)
0% | 18% | 31% | 29% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 18% | 31% | 29% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
models0% | 39% | 18% | 36% | 6%
data0% | 36% | 26% | 11% | 25%
models/decoders0% | 0% | 47% | 33% | 19%
models/encoders0% | 0% | 65% | 35% | 0%
eval/cameras0% | 0% | 59% | 0% | 40%
eval/writers0% | 0% | 42% | 26% | 32%
models/volsamplers0% | 0% | 0% | 85% | 14%
ROOT0% | 0% | 0% | 48% | 51%
models/colorcals0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def forward()
in models/neurvol1.py
83 17 17
def __getitem__()
in data/dryice1.py
52 13 2
def xaviermultiplier()
in models/utils.py
38 8 2
def __init__()
in data/dryice1.py
38 8 12
def __init__()
in models/decoders/voxel1.py
32 4 7
def __init__()
in models/encoders/mvconv1.py
26 5 3
def forward()
in models/decoders/voxel1.py
25 7 4
def __init__()
in models/decoders/voxel1.py
22 2 2
def __getitem__()
in eval/cameras/rotate.py
22 1 2
def batch()
in eval/writers/videowriter.py
21 7 8
def __init__()
in models/decoders/voxel1.py
19 4 4
def forward()
in models/decoders/voxel1.py
19 3 2
def initmod()
in models/utils.py
18 11 3
def forward()
in models/volsamplers/warpvoxel.py
18 6 9
def __init__()
in models/decoders/voxel1.py
18 2 3
def __init__()
in models/neurvol1.py
17 3 9
def __init__()
in train.py
17 8 3
def load_krt()
in data/dryice1.py
16 8 1
def forward()
in models/utils.py
15 1 2
def forward()
in models/utils.py
14 1 2