aws / aws-dax-go
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 584 units with 8,395 lines of code in units (89.9% of code).
    • 12 very long units (1,533 lines of code)
    • 16 long units (1,041 lines of code)
    • 73 medium size units (2,326 lines of code)
    • 121 small units (1,794 lines of code)
    • 362 very small units (1,701 lines of code)
18% | 12% | 27% | 21% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go18% | 12% | 27% | 21% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
dax/internal/client19% | 15% | 30% | 23% | 11%
dax/internal/cbor34% | 12% | 25% | 14% | 13%
dax/internal/proxy0% | 77% | 0% | 0% | 22%
dax/internal/parser0% | 0% | 27% | 36% | 36%
dax0% | 0% | 10% | 10% | 79%
dax/internal/lru0% | 0% | 85% | 0% | 14%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func encodeTransactWriteItemsInput()
in dax/internal/client/request.go
244 58 6
func DecodeAttributeValue()
in dax/internal/cbor/attrval.go
142 40 1
func decodeBatchGetItemOutput()
in dax/internal/client/response.go
135 39 6
func()
in dax/internal/client/single.go
132 32 1
func decodeError()
in dax/internal/client/error.go
119 39 1
func encodeScanQueryOptionalParams()
in dax/internal/client/request.go
114 39 14
func()
in dax/internal/client/single.go
113 31 1
func encode()
in dax/internal/cbor/lexdecimal.go
113 30 3
func GetEncodedItemKey()
in dax/internal/cbor/item.go
112 34 2
func decode()
in dax/internal/cbor/lexdecimal.go
104 20 2
func decodeBatchWriteItemOutput()
in dax/internal/client/response.go
103 29 5
func convertDaxError()
in dax/internal/client/error.go
102 25 1
func DecodeItemKey()
in dax/internal/cbor/item.go
94 24 2
func encodeTransactGetItemsInput()
in dax/internal/client/request.go
88 22 5
func EncodeAttributeValue()
in dax/internal/cbor/attrval.go
79 32 2
func encodeItemOperationOptionalParamsWithToken()
in dax/internal/client/request.go
72 27 11
func encodeBatchGetItemInput()
in dax/internal/client/request.go
68 21 4
func newSingleClientWithOptions()
in dax/internal/client/single.go
64 9 6
func decodeConsumedCapacityExtended()
in dax/internal/client/response.go
63 18 1
func encodeBatchWriteItemInput()
in dax/internal/client/request.go
62 19 5