golang / time
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 23 units with 216 lines of code in units (89.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (111 lines of code)
    • 1 small units (13 lines of code)
    • 19 very small units (92 lines of code)
0% | 0% | 51% | 6% | 42%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 0% | 51% | 6% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
rate0% | 0% | 51% | 6% | 42%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in rate/rate.go
48 8 1
func()
in rate/rate.go
36 9 1
func()
in rate/rate.go
27 9 1
func()
in rate/rate.go
13 3 1
func()
in rate/rate.go
10 3 1
func()
in rate/rate.go
8 1 1
func()
in rate/rate.go
8 1 1
func()
in rate/rate.go
7 2 1
func Every()
in rate/rate.go
6 2 1
func NewLimiter()
in rate/rate.go
6 1 2
func()
in rate/rate.go
6 2 1
func()
in rate/rate.go
5 1 1
func()
in rate/rate.go
5 1 1
func()
in rate/rate.go
4 1 1
func()
in rate/rate.go
3 1 1
func()
in rate/rate.go
3 1 1
func()
in rate/rate.go
3 1 1
func()
in rate/rate.go
3 1 1
func()
in rate/rate.go
3 1 1
func()
in rate/rate.go
3 1 1