Linux / Drivers / Accessibility
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 284 units with 5,395 lines of code in units (56.9% of code).
    • 2 very long units (212 lines of code)
    • 21 long units (1,470 lines of code)
    • 54 medium size units (1,744 lines of code)
    • 76 small units (1,120 lines of code)
    • 131 very small units (849 lines of code)
3% | 27% | 32% | 20% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c3% | 27% | 32% | 20% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
braille39% | 25% | 14% | 11% | 9%
speakup1% | 27% | 33% | 21% | 16%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
111 31 3
101 24 4
91 27 5
89 17 1
82 17 1
78 18 1
77 26 4
77 27 4
76 14 1
72 20 3
72 23 4
70 15 1
70 14 1
69 25 2
68 17 2
68 11 2
65 8 1
63 16 3
63 22 3
62 14 4
54 8 1
52 17 1
52 15 3
50 10 1
49 9 1
49 10 3
49 7 2
47 13 3
47 16 1
46 7 1
44 15 1
43 21 1
42 15 1
42 11 2
42 7 1
41 8 1
41 13 1
40 12 1
39 9 1
37 15 3
36 10 3
35 8 4
34 8 4
33 5 3
33 9 1
32 11 1
31 7 1
31 6 1
31 8 1
29 5 1