facebookincubator / prometheus-edge-hub
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 50 units with 423 lines of code in units (55.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (147 lines of code)
    • 11 small units (153 lines of code)
    • 34 very small units (123 lines of code)
0% | 0% | 34% | 36% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 0% | 34% | 36% | 29%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
hub0% | 0% | 43% | 42% | 14%
ROOT0% | 0% | 53% | 28% | 17%
grpc0% | 0% | 0% | 18% | 81%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
36 3 1
34 5 1
32 6 1
24 5 1
21 2 0
20 4 1
17 3 3
16 4 0
14 3 1
14 4 1
13 2 2
13 1 1
12 3 3
12 2 2
11 3 1
11 2 3
10 3 1
8 2 1
8 2 1
7 2 2
7 1 2
7 2 1
6 2 1
4 1 1
4 1 0
4 1 0
3 1 1
3 1 1
3 1 1
3 1 1
3 1 1
3 1 1
3 1 1
3 1 1
3 1 1
3 1 1
3 1 1
3 1 1
3 1 1
3 1 1
3 1 2
3 1 1
3 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 0