kubernetes / kube-state-metrics
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 63 files with 8,916 lines of code.
    • 1 very long files (1,228 lines of code)
    • 0 long files (0 lines of code)
    • 13 medium size files (3,698 lines of codeclsfd_ftr_w_mp_ins)
    • 18 small files (2,672 lines of code)
    • 31 very small files (1,318 lines of code)
13% | 0% | 41% | 29% | 14%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
go13% | 0% | 41% | 30% | 14%
yaml0% | 0% | 0% | 0% | 100%
jsonnet0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
internal/store17% | 0% | 47% | 30% | 4%
pkg/app0% | 0% | 100% | 0% | 0%
pkg/metricshandler0% | 0% | 0% | 100% | 0%
pkg/options0% | 0% | 0% | 59% | 40%
pkg/allowdenylist0% | 0% | 0% | 100% | 0%
pkg/builder0% | 0% | 0% | 0% | 100%
pkg/metrics_store0% | 0% | 0% | 0% | 100%
pkg/metric0% | 0% | 0% | 0% | 100%
pkg/sharding0% | 0% | 0% | 0% | 100%
pkg/metric_generator0% | 0% | 0% | 0% | 100%
pkg/watch0% | 0% | 0% | 0% | 100%
pkg/allow0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
pkg/optin0% | 0% | 0% | 0% | 100%
pkg/version0% | 0% | 0% | 0% | 100%
pkg/util0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
pkg/customresource0% | 0% | 0% | 0% | 100%
tools0% | 0% | 0% | 0% | 100%
pkg/constant0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
pod.go
in internal/store
1228 46
node.go
in internal/store
403 13
builder.go
in internal/store
390 55
job.go
in internal/store
362 4
deployment.go
in internal/store
300 3
cronjob.go
in internal/store
279 4
verticalpodautoscaler.go
in internal/store
272 4
horizontalpodautoscaler.go
in internal/store
265 4
statefulset.go
in internal/store
255 3
daemonset.go
in internal/store
252 3
persistentvolume.go
in internal/store
251 3
server.go
in pkg/app
237 6
replicaset.go
in internal/store
231 3
persistentvolumeclaim.go
in internal/store
201 4
replicationcontroller.go
in internal/store
198 2
metrics_handler.go
in pkg/metricshandler
189 7
types.go
in pkg/options
184 18
ingress.go
in internal/store
176 3
poddisruptionbudget.go
in internal/store
174 3
endpoint.go
in internal/store
174 3
service.go
in internal/store
169 3
certificatesigningrequest.go
in internal/store
151 4
volumeattachment.go
in internal/store
147 2
secret.go
in internal/store
142 3
namespace.go
in internal/store
142 3
networkpolicy.go
in internal/store
133 3
utils.go
in internal/store
133 16
configmap.go
in internal/store
123 3
storageclass.go
in internal/store
120 3
testutils.go
in internal/store
110 6
limitrange.go
in internal/store
105 2
allowdenylist.go
in pkg/allowdenylist
102 9
options.go
in pkg/options
88 4
metrics_store.go
in pkg/metrics_store
87 11
lease.go
in internal/store
87 2
resourcequota.go
in internal/store
84 2
validatingwebhookconfiguration.go
in internal/store
81 2
mutatingwebhookconfiguration.go
in internal/store
81 2
metric.go
in pkg/metric
80 4
builder.go
in pkg/builder
80 20
listwatch.go
in pkg/sharding
70 4
watch.go
in pkg/watch
69 4
generator.go
in pkg/metric_generator
68 6
allow_labels.go
in pkg/allow
48 2
interfaces.go
in pkg/builder/types
48 -
optin.go
in pkg/optin
43 4
resource.go
in pkg/options
37 -
version.go
in pkg/version
35 2
metrics_writer.go
in pkg/metrics_store
33 2
main.go
in root
29 1
Files With Most Units (Top 20)
File# lines# units
builder.go
in internal/store
390 55
pod.go
in internal/store
1228 46
builder.go
in pkg/builder
80 20
types.go
in pkg/options
184 18
utils.go
in internal/store
133 16
node.go
in internal/store
403 13
metrics_store.go
in pkg/metrics_store
87 11
allowdenylist.go
in pkg/allowdenylist
102 9
metrics_handler.go
in pkg/metricshandler
189 7
generator.go
in pkg/metric_generator
68 6
server.go
in pkg/app
237 6
testutils.go
in internal/store
110 6
listwatch.go
in pkg/sharding
70 4
options.go
in pkg/options
88 4
metric.go
in pkg/metric
80 4
optin.go
in pkg/optin
43 4
watch.go
in pkg/watch
69 4
horizontalpodautoscaler.go
in internal/store
265 4
job.go
in internal/store
362 4
persistentvolumeclaim.go
in internal/store
201 4
Files With Long Lines (Top 20)

There are 32 files with lines longer than 120 characters. In total, there are 142 long lines.

File# lines# units# long lines
builder.go
in internal/store
390 55 33
pod.go
in internal/store
1228 46 23
options.go
in pkg/options
88 4 15
metrics_handler.go
in pkg/metricshandler
189 7 6
validatingwebhookconfiguration.go
in internal/store
81 2 6
mutatingwebhookconfiguration.go
in internal/store
81 2 6
verticalpodautoscaler.go
in internal/store
272 4 6
deployment.go
in internal/store
300 3 4
daemonset.go
in internal/store
252 3 4
server.go
in pkg/app
237 6 3
poddisruptionbudget.go
in internal/store
174 3 3
persistentvolumeclaim.go
in internal/store
201 4 3
cronjob.go
in internal/store
279 4 3
persistentvolume.go
in internal/store
251 3 3
generator.go
in pkg/metric_generator
68 6 2
job.go
in internal/store
362 4 2
replicationcontroller.go
in internal/store
198 2 2
statefulset.go
in internal/store
255 3 2
endpoint.go
in internal/store
174 3 2
ingress.go
in internal/store
176 3 2