kubernetes / node-api
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 71 units with 522 lines of code in units (61.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (42 lines of code)
    • 11 small units (160 lines of code)
    • 58 very small units (320 lines of code)
0% | 0% | 8% | 30% | 61%
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% | 8% | 30% | 61%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
pkg/client/informers/externalversions/node0% | 0% | 46% | 0% | 53%
pkg/client/clientset/versioned/fake0% | 0% | 61% | 0% | 38%
pkg/client/clientset/versioned/typed0% | 0% | 0% | 38% | 61%
pkg/client/informers/externalversions0% | 0% | 0% | 48% | 52%
pkg/client/clientset/versioned0% | 0% | 0% | 48% | 51%
pkg/apis/node/v1alpha10% | 0% | 0% | 17% | 82%
pkg/client/listers/node/v1alpha10% | 0% | 0% | 0% | 100%
pkg/client/clientset/versioned/scheme0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func NewFilteredRuntimeClassInformer()
in pkg/client/informers/externalversions/node/v1alpha1/runtimeclass.go
21 3 4
func NewSimpleClientset()
in pkg/client/clientset/versioned/fake/clientset_generated.go
21 4 1
func NewForConfig()
in pkg/client/clientset/versioned/clientset.go
20 6 1
func()
in pkg/client/informers/externalversions/factory.go
18 4 1
func()
in pkg/client/clientset/versioned/typed/node/v1alpha1/fake/fake_runtimeclass.go
18 5 1
func()
in pkg/client/informers/externalversions/factory.go
16 3 1
func NewSharedInformerFactoryWithOptions()
in pkg/client/informers/externalversions/factory.go
14 2 3
func()
in pkg/client/clientset/versioned/typed/node/v1alpha1/runtimeclass.go
14 2 1
func()
in pkg/client/clientset/versioned/typed/node/v1alpha1/runtimeclass.go
13 2 1
func()
in pkg/apis/node/v1alpha1/zz_generated.deepcopy.go
13 3 1
func()
in pkg/client/clientset/versioned/typed/node/v1alpha1/runtimeclass.go
12 2 1
func NewForConfig()
in pkg/client/clientset/versioned/typed/node/v1alpha1/node_client.go
11 3 1
func()
in pkg/client/clientset/versioned/typed/node/v1alpha1/runtimeclass.go
11 1 1
func()
in pkg/client/informers/externalversions/factory.go
10 3 1
func setConfigDefaults()
in pkg/client/clientset/versioned/typed/node/v1alpha1/node_client.go
10 2 1
func()
in pkg/client/clientset/versioned/typed/node/v1alpha1/runtimeclass.go
10 1 1
func()
in pkg/client/clientset/versioned/typed/node/v1alpha1/runtimeclass.go
10 1 1
func()
in pkg/client/listers/node/v1alpha1/runtimeclass.go
10 3 1
func()
in pkg/client/clientset/versioned/typed/node/v1alpha1/runtimeclass.go
9 1 1
func()
in pkg/apis/node/v1alpha1/zz_generated.deepcopy.go
9 2 1