aws-samples / aws-step-functions-long-lived-transactions
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 45 units with 429 lines of code in units (36.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (50 lines of code)
    • 13 small units (216 lines of code)
    • 30 very small units (163 lines of code)
0% | 0% | 11% | 50% | 37%
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% | 11% | 50% | 37%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
inventory-release0% | 0% | 34% | 47% | 18%
payment-credit0% | 0% | 34% | 47% | 18%
order-update0% | 0% | 0% | 80% | 19%
payment-debit0% | 0% | 0% | 72% | 27%
inventory-reserve0% | 0% | 0% | 71% | 28%
order-new0% | 0% | 0% | 68% | 31%
models0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func getTransaction()
in inventory-release/main.go
25 3 2
func getTransaction()
in payment-credit/main.go
25 3 2
func handler()
in inventory-release/main.go
20 4 2
func getOrder()
in order-update/main.go
20 3 2
func handler()
in payment-credit/main.go
20 4 2
func handler()
in payment-debit/main.go
20 3 2
func handler()
in order-update/main.go
19 4 2
func handler()
in inventory-reserve/main.go
19 3 2
func handler()
in order-new/main.go
14 3 2
func saveOrder()
in order-new/main.go
14 3 2
func saveTransaction()
in inventory-release/main.go
14 3 2
func saveOrder()
in order-update/main.go
14 3 2
func saveTransaction()
in payment-credit/main.go
14 3 2
func saveInventory()
in inventory-reserve/main.go
14 3 2
func savePayment()
in payment-debit/main.go
14 3 2
func init()
in order-new/main.go
10 1 0
func init()
in inventory-release/main.go
10 1 0
func init()
in order-update/main.go
10 1 0
func init()
in payment-credit/main.go
10 1 0
func init()
in inventory-reserve/main.go
10 1 0