microsoft / hcsshim
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 550 files with 79,092 lines of code.
    • 9 very long files (31,140 lines of code)
    • 14 long files (8,480 lines of code)
    • 65 medium size files (19,007 lines of codeclsfd_ftr_w_mp_ins)
    • 61 small files (8,432 lines of code)
    • 401 very small files (12,033 lines of code)
39% | 10% | 24% | 10% | 15%
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
go40% | 10% | 23% | 10% | 14%
c0% | 0% | 74% | 0% | 26%
proto0% | 0% | 31% | 22% | 45%
ps10% | 0% | 0% | 0% | 100%
toml0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
internal31% | 10% | 27% | 11% | 17%
pkg86% | 0% | 4% | 4% | 4%
cmd32% | 15% | 20% | 13% | 16%
ext458% | 0% | 29% | 9% | 3%
ROOT0% | 48% | 0% | 19% | 31%
hcn0% | 24% | 64% | 7% | 3%
init0% | 0% | 100% | 0% | 0%
computestorage0% | 0% | 38% | 18% | 42%
scripts0% | 0% | 0% | 0% | 100%
vsockexec0% | 0% | 0% | 0% | 100%
osversion0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
vmservice.pb.go
in internal/vmservice
8766 477
networkconfigproxy.pb.go
in pkg/ncproxy/ncproxygrpc/v1
8747 545
stats.pb.go
in cmd/containerd-shim-runhcs-v1/stats
2723 139
computeagent.pb.go
in internal/computeagent
2548 157
nodenetsvc.pb.go
in pkg/ncproxy/nodenetsvc/v1
2445 149
shimdiag.pb.go
in internal/shimdiag
1836 117
runhcs.pb.go
in cmd/containerd-shim-runhcs-v1/options
1663 37
networkconfigproxy.pb.go
in internal/ncproxyttrpc
1247 92
compact.go
in ext4/internal/compactext4
1165 47
task_hcs.go
in cmd/containerd-shim-runhcs-v1
806 28
mksyscall_windows.go
in root
746 52
zsyscall_windows.go
in hcn
720 59
ncproxy.go
in cmd/ncproxy
704 21
legacy.go
in internal/wclayer
680 23
container.go
in cmd/runhcs
588 18
protocol.go
in internal/guest/prot
555 5
runc.go
in internal/guest/runtime/runc
543 34
network.go
in internal/uvm
541 28
extendedtask.pb.go
in internal/extendedtask
537 36
zsyscall_windows.go
in internal/vmcompute
522 43
scsi.go
in internal/uvm
519 21
zsyscall_windows.go
in internal/wclayer
512 41
vmcompute.go
in internal/vmcompute
507 27
system.go
in internal/hcs
477 26
uvm.go
in internal/guest/runtime/hcsv2
457 23
jobcontainer.go
in internal/jobcontainers
453 22
main.go
in internal/tools/networkagent
442 12
process.go
in internal/hcs
413 18
exec.go
in internal/exec
408 21
create_lcow.go
in internal/uvm
398 5
bridge_v2.go
in internal/guest/bridge
396 14
service_internal.go
in cmd/containerd-shim-runhcs-v1
386 22
layers.go
in internal/layers
377 9
format.go
in ext4/internal/format
372 -
service.go
in cmd/containerd-shim-runhcs-v1
364 22
bridge.go
in internal/gcs
362 20
hcsdoc_wcow.go
in internal/hcsoci
360 4
hcnnetwork.go
in hcn
356 16
vsmb.go
in internal/uvm
354 11
exec_hcs.go
in cmd/containerd-shim-runhcs-v1
348 15
hcnnamespace.go
in hcn
345 17
create.go
in internal/hcsoci
340 12
uvm.go
in internal/oci
339 22
bridge.go
in internal/guest/bridge
336 12
init.c
in init
333 11
securitypolicyenforcer.go
in pkg/securitypolicy
320 27
jobobject.go
in internal/jobobject
318 12
zsyscall_windows.go
in internal/winapi
314 30
hcnendpoint.go
in hcn
308 16
safeopen.go
in internal/safefile
302 13
Files With Most Units (Top 20)
File# lines# units
networkconfigproxy.pb.go
in pkg/ncproxy/ncproxygrpc/v1
8747 545
vmservice.pb.go
in internal/vmservice
8766 477
computeagent.pb.go
in internal/computeagent
2548 157
nodenetsvc.pb.go
in pkg/ncproxy/nodenetsvc/v1
2445 149
stats.pb.go
in cmd/containerd-shim-runhcs-v1/stats
2723 139
shimdiag.pb.go
in internal/shimdiag
1836 117
networkconfigproxy.pb.go
in internal/ncproxyttrpc
1247 92
zsyscall_windows.go
in hcn
720 59
mksyscall_windows.go
in root
746 52
compact.go
in ext4/internal/compactext4
1165 47
zsyscall_windows.go
in internal/vmcompute
522 43
zsyscall_windows.go
in internal/wclayer
512 41
runhcs.pb.go
in cmd/containerd-shim-runhcs-v1/options
1663 37
extendedtask.pb.go
in internal/extendedtask
537 36
runc.go
in internal/guest/runtime/runc
543 34
zsyscall_windows.go
in internal/winapi
314 30
task_hcs.go
in cmd/containerd-shim-runhcs-v1
806 28
network.go
in internal/uvm
541 28
vmcompute.go
in internal/vmcompute
507 27
securitypolicyenforcer.go
in pkg/securitypolicy
320 27
Files With Long Lines (Top 20)

There are 147 files with lines longer than 120 characters. In total, there are 905 long lines.

File# lines# units# long lines
networkconfigproxy.pb.go
in pkg/ncproxy/ncproxygrpc/v1
8747 545 89
vmservice.pb.go
in internal/vmservice
8766 477 80
stats.pb.go
in cmd/containerd-shim-runhcs-v1/stats
2723 139 48
zsyscall_windows.go
in hcn
720 59 37
zsyscall_windows.go
in internal/winapi
314 30 35
nodenetsvc.pb.go
in pkg/ncproxy/nodenetsvc/v1
2445 149 34
uvm.go
in internal/oci
339 22 30
zsyscall_windows.go
in internal/vmcompute
522 43 29
runhcs.pb.go
in cmd/containerd-shim-runhcs-v1/options
1663 37 27
ncproxy.go
in cmd/ncproxy
704 21 23
zsyscall_windows.go
in internal/wclayer
512 41 23
nodenetsvc_mock.pb.go
in pkg/ncproxy/nodenetsvc/v1/mock
146 20 20
computeagent.pb.go
in internal/computeagent
2548 157 18
hcnglobals.go
in hcn
96 2 16
uvm.go
in internal/guest/runtime/hcsv2
457 23 15
runc.go
in internal/guest/runtime/runc
543 34 13
networkconfigproxy.pb.go
in internal/ncproxyttrpc
1247 92 13
securitypolicyenforcer.go
in pkg/securitypolicy
320 27 13
system.go
in internal/hcs
477 26 11
create.go
in internal/hcsoci
340 12 11