facebookincubator / smt2utils
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 375 units with 4,080 lines of code in units (55.1% of code).
    • 6 very long units (872 lines of code)
    • 5 long units (372 lines of code)
    • 17 medium size units (558 lines of code)
    • 46 small units (663 lines of code)
    • 301 very small units (1,615 lines of code)
21% | 9% | 13% | 16% | 39%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rs21% | 9% | 13% | 16% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
smt2parser/src20% | 3% | 6% | 12% | 57%
z3tracer/src28% | 13% | 18% | 23% | 15%
smt2proxy/src0% | 39% | 48% | 9% | 2%
smt2patch/src0% | 0% | 0% | 39% | 60%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
220 4 1
172 25 1
161 19 0
109 1 2
108 3 0
102 1 0
92 26 4
86 14 2
72 2 2
71 6 3
51 6 0
50 5 1
47 5 0
39 2 5
39 6 2
38 1 2
35 11 1
34 4 6
34 6 1
33 10 4
33 2 2
31 5 2
27 1 0
26 5 4
24 1 0
24 8 1
23 5 4
21 6 1
20 4 2
19 3 2
19 2 3
18 2 4
18 1 3
18 3 1
18 1 0
17 1 2
17 2 1
17 8 1
17 3 2
17 1 0
17 2 2
16 2 3
16 3 4
16 2 0
15 5 2
15 1 2
15 1 2
15 5 2
15 1 7
15 1 0