firecracker-microvm / firectl
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 16 units with 358 lines of code in units (78.3% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (136 lines of code)
    • 4 medium size units (119 lines of code)
    • 4 small units (68 lines of code)
    • 6 very small units (35 lines of code)
0% | 37% | 33% | 18% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 37% | 33% | 18% | 9%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 37% | 33% | 18% | 9%
Alternative Visuals
Longest Units
Top 16 longest units
Unit# linesMcCabe index# params
func()
in options.go
71 9 1
func runVMM()
in main.go
65 14 2
func()
in options.go
44 14 1
29 6 1
func main()
in main.go
25 7 0
func()
in options.go
21 4 1
func parseVsocks()
in options.go
19 6 1
17 3 0
17 5 2
func()
in options.go
15 2 1
9 3 1
func()
in options.go
8 3 1
7 4 1
func newOptions()
in options.go
5 1 0
func()
in options.go
3 1 1
3 1 1