korosuke613 / travis-gtest-cmake-example
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 2,013 units with 15,132 lines of code in units (40.6% of code).
    • 4 very long units (439 lines of code)
    • 13 long units (836 lines of code)
    • 144 medium size units (4,275 lines of code)
    • 246 small units (3,665 lines of code)
    • 1,606 very small units (5,917 lines of code)
2% | 5% | 28% | 24% | 39%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py9% | 12% | 34% | 17% | 24%
cc0% | 4% | 34% | 32% | 28%
h0% | <1% | 18% | 22% | 58%
cpp0% | 0% | 0% | 31% | 68%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ext2% | 5% | 28% | 24% | 39%
src0% | 0% | 0% | 31% | 68%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
118 58 1
111 18 5
105 45 2
105 45 2
84 27 2
73 18 0
71 29 2
71 29 2
70 2 0
65 19 2
64 11 2
60 10 5
60 15 4
58 12 1
55 14 2
54 15 2
51 13 3
50 1 1
47 5 0
47 13 7
47 13 7
47 16 3
46 12 2
46 5 3
45 13 1
44 14 3
44 19 3
44 9 1
44 10 2
44 14 2
43 1 1
43 9 3
43 12 2
43 14 0
42 8 0
42 10 5
42 11 5
41 10 0
41 1 1
41 10 4
40 12 2
39 12 1
38 1 1
38 9 3
37 9 0
37 11 1
37 13 2
37 7 2
37 11 1
37 13 2