novifinancial / rust-plasma
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 89 units with 992 lines of code in units (39.3% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (125 lines of code)
    • 10 medium size units (318 lines of code)
    • 16 small units (237 lines of code)
    • 61 very small units (312 lines of code)
0% | 12% | 32% | 23% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rs0% | 8% | 38% | 28% | 23%
cc0% | 31% | 0% | 0% | 68%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
plasma-stream/src0% | 30% | 40% | 20% | 8%
plasma-store/src/ffi0% | 18% | 0% | 12% | 68%
plasma-store/src0% | 0% | 35% | 33% | 31%
plasma-stream/src/server0% | 0% | 45% | 44% | 9%
plasma-store0% | 0% | 97% | 0% | 2%
plasma-stream/src/client0% | 0% | 67% | 32% | 0%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
71 3 2
54 17 1
48 3 2
47 1 0
42 2 0
33 3 1
30 1 0
25 2 2
25 5 2
23 4 2
23 1 0
22 1 2
20 1 2
19 5 1
18 2 0
17 4 1
16 4 1
16 1 0
15 1 2
15 1 0
14 1 4
14 1 0
13 2 2
13 2 0
13 1 0
12 1 0
11 4 1
11 1 0
10 2 1
9 3 1
9 1 0
9 1 0
8 1 0
8 1 0
8 1 0
7 1 1
7 1 1
7 1 1
7 1 5
7 1 4
7 1 4
7 1 0
7 1 0
7 1 0
6 2 1
6 1 3
6 1 4
6 1 3
6 1 0
5 1 1