facebookresearch / exploring_exploration
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 409 units with 8,352 lines of code in units (64.2% of code).
    • 11 very long units (2,880 lines of code)
    • 23 long units (1,646 lines of code)
    • 54 medium size units (1,680 lines of code)
    • 65 small units (888 lines of code)
    • 256 very small units (1,258 lines of code)
34% | 19% | 20% | 10% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py34% | 19% | 20% | 10% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT100% | 0% | 0% | 0% | 0%
exploring_exploration98% | 0% | 0% | 0% | 1%
exploring_exploration/utils20% | 17% | 8% | 25% | 28%
reconstruction_data_generation93% | 0% | 0% | 0% | 6%
environments/gym-avd0% | 37% | 38% | 10% | 14%
exploring_exploration/models0% | 26% | 27% | 16% | 29%
exploring_exploration/algo0% | 50% | 31% | 11% | 6%
exploring_exploration/envs0% | 0% | 32% | 24% | 43%
reconstruction_data_generation/mp3d0% | 0% | 83% | 0% | 16%
reconstruction_data_generation/avd0% | 0% | 75% | 0% | 25%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in train_reconstruction_exploration.py
427 66 0
def main()
in train_curiosity_exploration.py
383 64 0
def get_args()
in exploring_exploration/arguments.py
329 2 0
def main()
in train_exploration.py
320 50 0
def main()
in pretrain_imitation.py
300 47 0
def evaluate_tdn_astar()
in exploring_exploration/utils/eval.py
272 61 5
def main()
in pretrain_reconstruction.py
219 35 0
def main()
in evaluate_pose_estimation.py
180 18 0
def main()
in reconstruction_data_generation/generate_imagenet_clusters.py
170 28 1
def main()
in evaluate_reconstruction.py
154 19 0
def main()
in evaluate_visitation.py
126 16 0
def _sample_pose_refs()
in environments/gym-avd/gym_avd/envs/avd_recon_env.py
96 15 1
def update()
in exploring_exploration/algo/ppo.py
92 9 2
def _sample_pose_refs()
in environments/gym-avd/gym_avd/envs/avd_nav_env.py
91 13 1
def _sample_pose_refs()
in environments/gym-avd/gym_avd/envs/avd_pose_env.py
91 13 1
def recurrent_generator()
in exploring_exploration/utils/storage.py
89 7 3
def get_local_maps()
in environments/gym-avd/gym_avd/envs/avd_occ_base_env.py
86 6 1
def recurrent_generator()
in exploring_exploration/utils/storage.py
84 7 3
def act()
in exploring_exploration/models/navigation.py
80 22 5
def reset()
in environments/gym-avd/gym_avd/envs/avd_nav_env.py
74 6 2