kubernetes / dashboard
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 1,447 units with 16,041 lines of code in units (34.8% of code).
    • 1 very long units (561 lines of code)
    • 11 long units (706 lines of code)
    • 128 medium size units (3,484 lines of code)
    • 448 small units (6,524 lines of code)
    • 859 very small units (4,766 lines of code)
3% | 4% | 21% | 40% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go4% | 4% | 23% | 42% | 25%
ts0% | 5% | 12% | 29% | 52%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/app/backend4% | 4% | 23% | 42% | 25%
src/app/frontend0% | 5% | 13% | 30% | 51%
cypress/pages0% | 0% | 0% | 0% | 100%
cypress/plugins0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func CreateHTTPAPIHandler()
in src/app/backend/handler/apihandler.go
561 1 5
func main()
in src/app/backend/dashboard.go
93 15 0
func DeployApp()
in src/app/backend/resource/deployment/deploy.go
89 11 2
func getPodStatus()
in src/app/backend/resource/pod/common.go
73 29 1
private updateResourcesRatio_()
in src/app/frontend/common/resources/groupedlist.ts
71 9 2
func getNodeAllocatedResources()
in src/app/backend/resource/node/detail.go
57 10 2
func DeployAppFromFile()
in src/app/backend/resource/deployment/deploy.go
56 15 2
func GetDeploymentDetail()
in src/app/backend/resource/deployment/detail.go
56 7 3
func evalEnvFrom()
in src/app/backend/resource/pod/detail.go
54 10 3
func NewGenericResponse()
in src/app/backend/errors/errors.go
53 14 2
func GetDeploymentOldReplicaSets()
in src/app/backend/resource/deployment/oldreplicasets.go
53 9 4
private _initBreadcrumbs()
in src/app/frontend/common/components/breadcrumbs/component.ts
51 17 0
func()
in src/app/backend/integration/metric/sidecar/client.go
50 11 1
func evalValueFrom()
in src/app/backend/resource/pod/detail.go
49 16 5
func GetDeploymentNewReplicaSet()
in src/app/backend/resource/deployment/newreplicasets.go
46 8 4
func GetPodDetail()
in src/app/backend/resource/pod/detail.go
46 7 4
private _getAllocation()
in src/app/frontend/resource/cluster/node/detail/component.ts
43 9 0
func NewResourceController()
in src/app/backend/resource/controller/controller.go
43 13 3
func GetPodPersistentVolumeClaims()
in src/app/backend/resource/persistentvolumeclaim/common.go
43 11 4
func GetCustomResourceObjectList()
in src/app/backend/resource/customresourcedefinition/v1/objects.go
41 7 5