aws / jsii-runtime-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 126 units with 1,582 lines of code in units (79.9% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (268 lines of code)
    • 17 medium size units (533 lines of code)
    • 22 small units (323 lines of code)
    • 83 very small units (458 lines of code)
0% | 16% | 33% | 20% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 17% | 34% | 19% | 29%
js0% | 0% | 0% | 100% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
internal/kernel0% | 21% | 32% | 16% | 28%
runtime0% | 23% | 12% | 42% | 21%
internal/kernel/process0% | 30% | 47% | 14% | 7%
internal/typeregistry0% | 0% | 50% | 30% | 19%
internal/objectstore0% | 0% | 65% | 0% | 34%
internal/embedded0% | 0% | 79% | 0% | 20%
ROOT0% | 0% | 0% | 0% | 100%
internal/api0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func Create()
in runtime/runtime.go
70 19 3
func()
in internal/kernel/conversions.go
70 20 1
func()
in internal/kernel/conversions.go
65 22 1
func NewProcess()
in internal/kernel/process/process.go
63 11 1
func()
in internal/kernel/callbacks.go
50 12 1
func()
in internal/kernel/process/process.go
40 9 1
func getMethodOverridesRec()
in runtime/runtime.go
38 12 3
func()
in internal/kernel/process/process.go
38 10 1
func()
in internal/kernel/callbacks.go
35 6 1
func castValToRef()
in internal/kernel/conversions.go
34 10 1
func()
in internal/kernel/conversions.go
34 10 1
func()
in internal/typeregistry/typeregistry.go
32 9 1
func()
in internal/objectstore/objectstore.go
32 10 1
func()
in internal/typeregistry/registration.go
29 10 1
func()
in internal/typeregistry/discover-implemented.go
28 10 1
func()
in internal/kernel/load.go
28 5 1
func extractRuntime()
in internal/embedded/embedded.go
27 8 2
func()
in internal/typeregistry/registration.go
24 9 1
func findAliases()
in internal/objectstore/objectstore.go
22 5 1
func()
in internal/kernel/manage-object.go
21 6 1