awslabs / aws-sigv4-proxy
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 10 units with 217 lines of code in units (74.8% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (117 lines of code)
    • 2 medium size units (49 lines of code)
    • 1 small units (19 lines of code)
    • 5 very small units (32 lines of code)
0% | 53% | 22% | 8% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 53% | 22% | 8% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 84% | 0% | 0% | 15%
handler0% | 39% | 33% | 13% | 14%
Alternative Visuals
Longest Units
Top 10 longest units
Unit# linesMcCabe index# params
func main()
in main.go
60 10 0
func()
in handler/proxy_client.go
57 16 1
func()
in handler/proxy_client.go
26 6 1
func()
in handler/handler.go
23 5 1
func init()
in handler/aws.go
19 6 0
func copyHeaderWithoutOverwrite()
in handler/proxy_client.go
9 4 2
8 3 1
8 2 0
func()
in handler/handler.go
4 1 1
func()
in main.go
3 1 1