facebookresearch / videoalignment
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 91 units with 1,371 lines of code in units (76.0% of code).
    • 2 very long units (235 lines of code)
    • 4 long units (278 lines of code)
    • 13 medium size units (398 lines of code)
    • 16 small units (228 lines of code)
    • 56 very small units (232 lines of code)
17% | 20% | 29% | 16% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py17% | 20% | 29% | 16% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
videoalignment22% | 20% | 20% | 18% | 18%
ROOT0% | 21% | 58% | 9% | 10%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def read_gt()
in videoalignment/datasets.py
121 25 1
def segment_pr()
in videoalignment/eval.py
114 22 6
def merge()
in videoalignment/temporal_match_kernel.py
79 7 4
def get_rmac_descriptors()
in rmac_features.py
68 7 5
def map_localization()
in videoalignment/eval.py
67 19 4
def localization_errors()
in videoalignment/eval.py
64 17 4
def train_pca()
in rmac_features.py
45 9 2
def check_data()
in videoalignment/datasets.py
38 13 1
37 14 3
def split_train_val()
in videoalignment/datasets.py
37 15 1
def split_train_val()
in videoalignment/datasets.py
35 14 1
def merge()
in videoalignment/circulant_temporal_encoding.py
33 8 5
def forward()
in rmac_features.py
32 7 2
def test()
in main.py
28 5 2
def compute_features()
in rmac_features.py
25 1 2
def annotate_connected_components()
in videoalignment/datasets.py
24 5 1
def split_train_val()
in videoalignment/datasets.py
22 14 1
def tmk()
in videoalignment/temporal_match_kernel.py
21 3 5
def main()
in main.py
21 6 1
def __init__()
in rmac_features.py
20 2 5