aws-samples / dynamodb-consumed-capacity-check-tool
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 14 units with 232 lines of code in units (79.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (109 lines of code)
    • 6 small units (92 lines of code)
    • 5 very small units (31 lines of code)
0% | 0% | 46% | 39% | 13%
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% | 46% | 39% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib0% | 0% | 41% | 44% | 13%
ROOT0% | 0% | 55% | 30% | 13%
Alternative Visuals
Longest Units
Top 14 longest units
Unit# linesMcCabe index# params
func main()
in main.go
47 3 0
func PutData()
in lib/load.go
31 5 10
func GetData()
in lib/load.go
31 5 9
19 2 4
func makeTestKeyString()
in lib/testdata.go
18 9 5
15 1 3
func AddFloat64()
in lib/load.go
14 3 2
14 1 0
func ticker()
in main.go
12 3 3
func()
in lib/testdata.go
10 2 1
func makeTestData()
in lib/load.go
7 2 1
6 1 1
5 1 4
func init()
in lib/load.go
3 1 0