facebookresearch / 3D-Vision-and-Touch
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 76 units with 1,044 lines of code in units (9.9% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (114 lines of code)
    • 12 medium size units (357 lines of code)
    • 24 small units (361 lines of code)
    • 38 very small units (212 lines of code)
0% | 10% | 34% | 34% | 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% | 11% | 34% | 33% | 20%
cpp0% | 0% | 0% | 100% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
vision_charts0% | 19% | 31% | 30% | 18%
touch_charts0% | 18% | 22% | 39% | 19%
ROOT0% | 0% | 46% | 30% | 23%
third_party_code0% | 0% | 0% | 93% | 6%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def pooling()
in vision_charts/models.py
61 1 4
def __call__()
in touch_charts/produce_sheets.py
53 2 1
48 1 1
39 9 4
def forward()
in touch_charts/models.py
36 2 6
31 1 3
def __init__()
in data_loaders.py
30 3 5
def validate()
in touch_charts/recon.py
28 1 3
def validate()
in vision_charts/recon.py
28 2 3
25 6 3
def __call__()
in vision_charts/recon.py
25 1 1
def add_commands()
in vision_charts/submit.py
23 1 4
def __init__()
in data_loaders.py
22 3 5
def forward()
in vision_charts/models.py
22 4 4
def __init__()
in touch_charts/models.py
20 2 3
def train()
in touch_charts/recon.py
20 1 3
def __init__()
in vision_charts/models.py
19 1 2
def train()
in vision_charts/recon.py
19 1 3
def __call__()
in touch_charts/recon.py
18 1 1
def forward()
in vision_charts/models.py
18 2 4