mapillary / metropolis_sdk
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 77 units with 642 lines of code in units (35.2% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (92 lines of code)
    • 5 medium size units (168 lines of code)
    • 6 small units (75 lines of code)
    • 65 very small units (307 lines of code)
0% | 14% | 26% | 11% | 47%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 14% | 26% | 11% | 47%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
metropolis/utils0% | 18% | 24% | 12% | 44%
metropolis0% | 0% | 31% | 7% | 60%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
92 1 0
44 17 2
38 1 3
35 7 2
30 1 4
21 1 1
14 1 3
14 1 3
13 2 3
12 1 2
11 1 0
11 2 1
10 1 0
10 1 3
10 2 2
9 1 2
9 1 1
9 1 0
8 1 0
8 1 2
8 1 0
8 1 0
8 1 2
7 1 0
7 1 6
7 1 6
7 1 6
7 1 0
7 1 9
7 1 9
6 1 0
6 3 4
6 1 0
6 1 6
6 1 3
5 1 2
5 1 2
5 1 0
5 1 0
5 1 2
5 1 2
5 1 2
5 3 2
5 2 3
5 1 0
5 1 0
4 1 2
4 1 2
4 1 4
4 1 0