facebookresearch / ContactOpt
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,215 lines of code in units (4.8% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (203 lines of code)
    • 13 medium size units (344 lines of code)
    • 31 small units (446 lines of code)
    • 44 very small units (222 lines of code)
0% | 16% | 28% | 36% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 16% | 28% | 36% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
contactopt0% | 16% | 28% | 36% | 18%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def run_contactopt()
in contactopt/run_contactopt.py
82 16 1
def show_optimization()
in contactopt/visualize.py
61 20 8
def optimize_pose()
in contactopt/optimize_pose.py
60 2 21
def generate_contactpose_dataset()
in contactopt/create_dataset_contactpose.py
35 10 8
def run_contactopt_parse_args()
in contactopt/arguments.py
34 2 0
def generate_pointnet_features()
in contactopt/hand_object.py
33 3 2
def process_image_pkl()
in contactopt/create_dataset_im.py
30 3 2
def run_eval()
in contactopt/run_eval.py
28 13 1
def fit_pca_to_axang()
in contactopt/util.py
25 2 2
def get_mano_closed_faces()
in contactopt/util.py
25 1 0
def __getitem__()
in contactopt/loader.py
25 2 2
def get_o3d_meshes()
in contactopt/hand_object.py
23 5 3
def text_3d()
in contactopt/util.py
22 3 7
def train_network_parse_args()
in contactopt/arguments.py
22 4 0
def capsule_sdf()
in contactopt/diffcontact.py
21 2 8
def train_epoch()
in contactopt/train_deepcontact.py
21 3 1
def vis_pointcloud()
in contactopt/util.py
20 4 4
def geometric_eval()
in contactopt/geometric_eval.py
20 1 2
def load_from_contactpose()
in contactopt/hand_object.py
20 6 2
def vis_sample()
in contactopt/run_eval.py
18 3 5