facebookresearch / pybulletX
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 156 units with 800 lines of code in units (53.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (79 lines of code)
    • 9 small units (131 lines of code)
    • 144 very small units (590 lines of code)
0% | 0% | 9% | 16% | 73%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 10% | 14% | 75%
js0% | 0% | 0% | 100% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
pybulletX0% | 0% | 9% | 13% | 76%
pybulletX/utils0% | 0% | 23% | 0% | 76%
pybulletX/gui0% | 0% | 0% | 40% | 59%
website/src/pages0% | 0% | 0% | 100% | 0%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def router()
in pybulletX/robot_interface.py
35 12 1
def _override_gym_spaces_dict_constructor()
in pybulletX/utils/space_dict.py
22 10 0
def full_state_space()
in pybulletX/robot_interface_mixin.py
22 1 1
def action_space()
in pybulletX/robot_interface_mixin.py
20 2 1
def __init__()
in pybulletX/gui/control_panel.py
17 1 4
def _setParameters()
in pybulletX/_wrapper.py
16 7 2
def __init__()
in pybulletX/gui/control_panel.py
16 7 2
function Feature()
in website/src/pages/index.js
14 2 3
def _getJointInfos()
in pybulletX/_wrapper.py
13 3 3
def _getDynamicsInfos()
in pybulletX/_wrapper.py
13 3 3
def _replace_original_methods()
in pybulletX/_wrapper.py
11 1 0
def to_nested_dict()
in pybulletX/helper.py
11 4 2
def __init__()
in pybulletX/body.py
10 1 5
def _getJointStates()
in pybulletX/_wrapper.py
9 2 2
def _getLinkStates()
in pybulletX/_wrapper.py
9 2 2
def test_soft_real_time_clock()
in pybulletX/utils/soft_real_time_clock.py
9 3 0
def __init__()
in pybulletX/gui/control_panel.py
9 6 5
def _use_state_space()
in pybulletX/robot_interface_mixin.py
9 2 1
def flatten_nested_dict()
in pybulletX/helper.py
9 4 3
def dump()
in pybulletX/helper.py
9 4 2