facebookresearch / RandomizedValueFunctions
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 153 units with 1,680 lines of code in units (54.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 36 medium size units (931 lines of code)
    • 19 small units (276 lines of code)
    • 98 very small units (473 lines of code)
0% | 0% | 55% | 16% | 28%
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% | 55% | 16% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
qlearn/atari0% | 0% | 67% | 9% | 22%
qlearn/toys0% | 0% | 65% | 0% | 34%
qlearn/commun0% | 0% | 34% | 35% | 30%
qlearn/envs0% | 0% | 0% | 56% | 44%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def forward()
in qlearn/commun/mnf_layer.py
36 4 3
def parse_args()
in qlearn/atari/train_prior_bootstrapped_agent.py
35 1 0
def parse_args()
in qlearn/atari/train_bootstrapped_agent.py
34 1 0
def parse_args()
in qlearn/atari/train_mnf_agent.py
34 1 0
def parse_args()
in qlearn/atari/train_dqn.py
33 1 0
def parse_args()
in qlearn/atari/train_bayes_backprop_agent.py
33 1 0
def parse_args()
in qlearn/atari/train_noisy_agent.py
33 1 0
def sample_z()
in qlearn/commun/local_mnf_layer.py
30 7 4
def learn()
in qlearn/atari/prior_bootstrapped_agent.py
29 3 6
def __init__()
in qlearn/atari/prior_bootstrapped_agent.py
27 9 4
def __init__()
in qlearn/commun/local_mnf_layer.py
27 3 10
def __init__()
in qlearn/commun/mnf_layer.py
27 3 9
def learn()
in qlearn/toys/bootstrapped_agent.py
26 5 6
def learn()
in qlearn/toys/mnf_agent.py
26 3 6
def learn()
in qlearn/toys/bayes_backprop_agent.py
26 3 6
def learn()
in qlearn/atari/local_mnf_agent.py
26 3 6
def learn()
in qlearn/toys/noisy_agent.py
24 3 6
def learn()
in qlearn/atari/mnf_agent.py
24 3 6
def learn()
in qlearn/atari/bayes_backprop_agent.py
24 3 6
def forward()
in qlearn/commun/local_mnf_layer.py
24 6 3