facebookresearch / bipedal-skills
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 101 units with 1,458 lines of code in units (69.1% of code).
    • 1 very long units (122 lines of code)
    • 4 long units (276 lines of code)
    • 13 medium size units (410 lines of code)
    • 21 small units (338 lines of code)
    • 62 very small units (312 lines of code)
8% | 18% | 28% | 23% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py8% | 18% | 28% | 23% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
bisk/tasks12% | 16% | 28% | 27% | 15%
bisk0% | 39% | 11% | 13% | 36%
bisk/features0% | 0% | 52% | 18% | 28%
exp0% | 0% | 85% | 0% | 14%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def init_sim()
in bisk/tasks/goalwall.py
122 2 3
def init_sim()
in bisk/tasks/polebalance.py
94 4 3
def init_sim()
in bisk/tasks/gaps.py
65 3 3
def root_with_floor()
in bisk/helpers.py
65 2 0
def add_ball()
in bisk/helpers.py
52 2 6
def init_sim()
in bisk/tasks/stairs.py
48 5 3
def reset_state()
in bisk/tasks/gaps.py
43 5 1
def reset_state()
in bisk/tasks/hurdleslimbo.py
41 4 1
def step()
in bisk/tasks/goalwall.py
38 11 2
def sensor_names()
in bisk/features/base.py
36 16 1
def add_fwd_corridor()
in bisk/helpers.py
33 2 2
def get_observation()
in bisk/tasks/hurdleslimbo.py
29 3 1
def step()
in bisk/tasks/polebalance.py
28 5 2
def reset_state()
in bisk/tasks/stairs.py
24 4 1
def reset_state()
in bisk/tasks/limbo.py
23 3 1
def qpos_names()
in bisk/features/base.py
23 7 1
def tick()
in exp/testgui.py
23 4 0
def qvel_names()
in bisk/features/base.py
21 7 1
def step()
in bisk/tasks/hurdleslimbo.py
20 7 2
def step()
in bisk/tasks/limbo.py
20 8 2