mapillary / mapillary_tools
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 212 units with 2,450 lines of code in units (40.1% of code).
    • 1 very long units (201 lines of code)
    • 5 long units (316 lines of code)
    • 27 medium size units (792 lines of code)
    • 29 small units (428 lines of code)
    • 150 very small units (713 lines of code)
8% | 12% | 32% | 17% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py8% | 12% | 32% | 17% | 29%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
mapillary_tools/commands35% | 9% | 37% | 5% | 12%
mapillary_tools/geotag0% | 39% | 30% | 13% | 16%
mapillary_tools0% | 3% | 31% | 23% | 41%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
201 2 2
89 15 1
64 12 1
57 10 1
55 17 2
51 8 1
46 7 1
45 15 1
43 1 2
42 9 0
41 12 2
36 4 2
36 7 1
35 11 1
33 4 1
32 11 2
32 7 1
28 13 1
27 1 1
25 3 1
24 5 1
24 3 2
24 1 2
23 6 1
23 6 1
23 1 2
23 1 2
22 5 2
21 6 1
21 1 1
21 3 3
21 7 1
21 4 1
20 3 4
20 4 2
20 2 3
19 3 2
19 6 1
19 1 2
17 4 1
17 4 1
16 3 1
16 4 1
15 6 1
15 3 1
15 1 2
14 3 1
14 1 0
14 1 0
13 2 1