facebookresearch / 2.5D-Visual-Sound
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 64 units with 515 lines of code in units (71.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (73 lines of code)
    • 4 medium size units (108 lines of code)
    • 10 small units (141 lines of code)
    • 49 very small units (193 lines of code)
0% | 14% | 20% | 27% | 37%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 14% | 20% | 27% | 37%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 37% | 26% | 14% | 21%
options0% | 0% | 78% | 16% | 4%
models0% | 0% | 0% | 41% | 58%
data0% | 0% | 0% | 43% | 56%
util0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in demo.py
73 3 0
def main()
in evaluate.py
31 3 0
def parse()
in options/base_options.py
29 1 1
def initialize()
in options/train_options.py
27 1 1
21 1 2
def __getitem__()
in data/audioVisual_dataset.py
20 2 2
def forward()
in models/networks.py
16 1 3
15 4 6
def process_image()
in data/audioVisual_dataset.py
14 2 2
def load_wav()
in reEncodeAudio.py
13 4 2
def forward()
in models/audioVisual_model.py
13 1 3
def __init__()
in models/networks.py
13 1 4
def forward()
in models/criterion.py
13 6 4
def initialize()
in options/base_options.py
12 1 1
def initialize()
in data/audioVisual_dataset.py
12 1 2
def CreateDataset()
in data/custom_dataset_data_loader.py
10 2 1
def main()
in reEncodeAudio.py
9 1 0
def weights_init()
in models/networks.py
9 4 1
9 1 2
def build_visual()
in models/models.py
8 2 2