facebookresearch / PoincareMaps
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 58 units with 1,264 lines of code in units (74.7% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (293 lines of code)
    • 19 medium size units (670 lines of code)
    • 11 small units (148 lines of code)
    • 24 very small units (153 lines of code)
0% | 23% | 53% | 11% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 23% | 53% | 11% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 23% | 53% | 11% | 12%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def train_model()
in decoder.py
94 4 14
def plotPoincareDisc()
in visualize.py
72 10 12
def plot_poincare_disc()
in poincare_maps.py
66 15 17
def plot_dtw_comparison()
in interpolation.py
61 8 18
def train()
in train.py
50 11 8
46 3 17
def __init__()
in decoder.py
44 1 5
def plot_pseudotime()
in poincare_maps.py
44 19 9
def kMedoids()
in kmedoids.py
43 10 3
40 10 6
def plot_markers_radius()
in poincare_maps.py
38 16 6
37 6 11
def plot_markers()
in poincare_maps.py
36 11 7
def plot2D()
in visualize.py
36 7 11
34 2 7
def get_quality_metrics()
in embedding_quality_score.py
30 6 7
def __init__()
in model.py
30 5 9
def plot_distances()
in poincare_maps.py
28 6 11
def forward()
in model.py
28 10 2
27 1 11