facebookincubator / submitit
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 223 units with 1,408 lines of code in units (67.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 12 medium size units (364 lines of code)
    • 23 small units (312 lines of code)
    • 188 very small units (732 lines of code)
0% | 0% | 25% | 22% | 51%
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% | 25% | 22% | 51%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
submitit/core0% | 0% | 24% | 16% | 58%
submitit/auto0% | 0% | 65% | 9% | 25%
submitit/slurm0% | 0% | 29% | 26% | 44%
submitit/local0% | 0% | 13% | 35% | 50%
integration0% | 0% | 37% | 45% | 16%
submitit0% | 0% | 0% | 20% | 79%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
50 22 2
35 4 1
34 11 1
33 9 3
31 9 2
31 1 0
28 13 3
27 9 0
27 6 1
23 8 1
23 7 5
22 4 0
20 6 1
19 6 1
18 7 3
18 5 2
16 1 2
15 5 1
15 2 3
14 2 1
14 7 2
13 7 2
13 4 1
12 5 0
12 1 2
12 11 1
12 8 2
12 2 2
11 4 2
11 5 5
11 5 1
11 5 5
11 1 1
11 4 1
11 3 2
10 4 3
10 3 2
10 3 4
10 1 1
10 3 2
10 3 2
10 6 2
9 2 3
9 2 2
9 3 2
9 4 1
9 3 1
8 6 1
8 6 1
8 2 5