facebookresearch / QuaterNet
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 92 units with 1,080 lines of code in units (73.3% of code).
    • 1 very long units (106 lines of code)
    • 3 long units (181 lines of code)
    • 8 medium size units (232 lines of code)
    • 23 small units (326 lines of code)
    • 57 very small units (235 lines of code)
9% | 16% | 21% | 30% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py9% | 16% | 21% | 30% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
common16% | 10% | 22% | 29% | 21%
long_term0% | 30% | 23% | 25% | 20%
short_term0% | 0% | 0% | 79% | 20%
ROOT0% | 0% | 0% | 46% | 53%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def train()
in common/pose_network.py
106 19 8
def render_animation()
in common/visualization.py
69 11 5
def train()
in long_term/pace_network.py
57 11 7
def generate_motion()
in long_term/pose_network_long_term.py
55 7 3
def build_phase_track()
in long_term/locomotion_utils.py
36 8 1
def qeuler()
in common/quaternion.py
36 7 3
def interpolate()
in common/spline.py
30 9 3
def forward()
in common/quaternet.py
30 7 5
def _prepare_next_batch_impl()
in long_term/pose_network_long_term.py
28 5 5
def euler_to_quaternion()
in common/quaternion.py
28 7 2
def remove_joints()
in common/skeleton.py
23 9 3
def _prepare_next_batch()
in long_term/pace_network.py
21 5 5
def _rotate_batch()
in long_term/pose_network_long_term.py
19 1 3
def forward_kinematics()
in common/skeleton.py
19 5 3
def _prepare_next_batch_impl()
in short_term/pose_network_short_term.py
18 4 5
def reparameterize()
in common/spline.py
18 5 3
def __init__()
in common/quaternet.py
18 2 5
def compute_splines()
in long_term/locomotion_utils.py
17 3 1
def predict()
in short_term/pose_network_short_term.py
16 3 3
def extract_translations_controls()
in long_term/locomotion_utils.py
15 1 2