facebookresearch / ContactPose
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 86 units with 1,429 lines of code in units (78.5% of code).
    • 0 very long units (0 lines of code)
    • 6 long units (478 lines of code)
    • 15 medium size units (440 lines of code)
    • 18 small units (255 lines of code)
    • 47 very small units (256 lines of code)
0% | 33% | 30% | 17% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 33% | 30% | 17% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
scripts0% | 70% | 0% | 8% | 20%
utilities0% | 12% | 36% | 27% | 22%
scripts/data_analysis0% | 55% | 24% | 13% | 7%
scripts/maintenance0% | 31% | 68% | 0% | 0%
ROOT0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def preprocess()
in scripts/preprocess_images.py
98 15 10
def download_images()
in scripts/download_data.py
94 33 7
def __init__()
in utilities/dataset.py
90 36 6
def show_contactmap()
in scripts/show_contactmap.py
76 18 9
def discover_active_areas()
in scripts/data_analysis/active_areas.py
69 10 6
def produce_worker()
in scripts/maintenance/produce_videos.py
51 11 2
def upload_dropbox()
in utilities/networking.py
44 8 3
def download_url_once()
in utilities/networking.py
41 13 3
def produce()
in scripts/maintenance/produce_videos.py
39 8 5
def fit_joints()
in utilities/mano_fitting.py
36 8 4
def __init__()
in utilities/rendering.py
35 6 5
def calc_hand_contact_prob()
in scripts/data_analysis/hand_contact_prob.py
30 8 6
def move()
in scripts/maintenance/move_videos_dropbox.py
27 6 3
def startup()
in startup.py
25 11 3
def load_mano_meshes()
in utilities/misc.py
25 5 3
def parse_multiargs()
in utilities/misc.py
24 9 1
def get_url()
in scripts/maintenance/get_urls.py
24 3 2
def crop_image()
in utilities/misc.py
23 7 4
def remove()
in scripts/maintenance/remove_videos.py
23 9 1
def quaternion_slerp()
in utilities/misc.py
22 7 5