golang / protobuf
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 45 files with 13,640 lines of code.
    • 3 very long files (6,971 lines of code)
    • 1 long files (687 lines of code)
    • 11 medium size files (4,062 lines of codeclsfd_ftr_w_mp_ins)
    • 6 small files (839 lines of code)
    • 24 very small files (1,081 lines of code)
51% | 5% | 29% | 6% | 7%
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
go53% | 5% | 28% | 5% | 7%
proto0% | 0% | 64% | 20% | 14%
bash0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
internal/testprotos76% | 0% | 19% | 2% | 1%
protoc-gen-go/generator97% | 0% | 0% | 0% | 2%
proto0% | 29% | 49% | 8% | 12%
jsonpb0% | 0% | 95% | 0% | 4%
protoc-gen-go/grpc0% | 0% | 100% | 0% | 0%
internal/gengogrpc0% | 0% | 100% | 0% | 0%
protoc-gen-go/descriptor0% | 0% | 0% | 100% | 0%
ptypes0% | 0% | 0% | 52% | 47%
descriptor0% | 0% | 0% | 100% | 0%
internal/cmd0% | 0% | 0% | 100% | 0%
ptypes/struct0% | 0% | 0% | 0% | 100%
protoc-gen-go/plugin0% | 0% | 0% | 0% | 100%
ptypes/wrappers0% | 0% | 0% | 0% | 100%
ptypes/timestamp0% | 0% | 0% | 0% | 100%
protoc-gen-go0% | 0% | 0% | 0% | 100%
ptypes/duration0% | 0% | 0% | 0% | 100%
ptypes/any0% | 0% | 0% | 0% | 100%
ptypes/empty0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Longest Files (Top 45)
File# lines# units
test.pb.go
in internal/testprotos/proto2_proto
3736 656
generator.go
in protoc-gen-go/generator
2125 113
test2.pb.go
in internal/testprotos/jsonpb_proto
1110 206
text_decode.go
in proto
687 21
test.pb.go
in internal/testprotos/proto3_proto
497 90
text_encode.go
in proto
490 19
encode.go
in jsonpb
464 11
decode.go
in jsonpb
440 14
proto
test.proto
in internal/testprotos/proto2_proto
414 -
grpc.go
in protoc-gen-go/grpc
411 17
grpc.go
in internal/gengogrpc
341 8
test3.pb.go
in internal/testprotos/jsonpb_proto
323 63
extensions.go
in proto
256 14
buffer.go
in proto
213 33
properties.go
in proto
213 8
registry.go
in proto
200 14
descriptor.pb.go
in protoc-gen-go/descriptor
155 2
proto
test2.proto
in internal/testprotos/jsonpb_proto
133 -
any.go
in ptypes
124 15
descriptor.go
in descriptor
115 7
main.go
in internal/cmd/generate-alias
112 2
deprecated.go
in proto
69 13
remap.go
in protoc-gen-go/generator/internal/remap
65 4
proto.go
in proto
65 10
struct.pb.go
in ptypes/struct
64 2
plugin.pb.go
in protoc-gen-go/plugin
61 2
wrappers.pb.go
in ptypes/wrappers
60 2
wire.go
in proto
60 5
timestamp.go
in ptypes
59 5
proto
test.proto
in internal/testprotos/proto3_proto
55 -
timestamp.pb.go
in ptypes/timestamp
53 2
main.go
in protoc-gen-go
52 1
duration.pb.go
in ptypes/duration
52 2
any.pb.go
in ptypes/any
51 2
duration.go
in ptypes
51 3
empty.pb.go
in ptypes/empty
51 2
defaults.go
in proto
49 2
json.go
in jsonpb
45 6
discard.go
in proto
38 2
proto
test3.proto
in internal/testprotos/jsonpb_proto
35 -
test.bash
in root
28 -
wrappers.go
in proto
10 9
regenerate.bash
in root
4 -
regenerate.bash
in internal/testprotos
3 -
doc.go
in ptypes
1 -
Files With Most Units (Top 20)
File# lines# units
test.pb.go
in internal/testprotos/proto2_proto
3736 656
test2.pb.go
in internal/testprotos/jsonpb_proto
1110 206
generator.go
in protoc-gen-go/generator
2125 113
test.pb.go
in internal/testprotos/proto3_proto
497 90
test3.pb.go
in internal/testprotos/jsonpb_proto
323 63
buffer.go
in proto
213 33
text_decode.go
in proto
687 21
text_encode.go
in proto
490 19
grpc.go
in protoc-gen-go/grpc
411 17
any.go
in ptypes
124 15
decode.go
in jsonpb
440 14
extensions.go
in proto
256 14
registry.go
in proto
200 14
deprecated.go
in proto
69 13
encode.go
in jsonpb
464 11
proto.go
in proto
65 10
wrappers.go
in proto
10 9
grpc.go
in internal/gengogrpc
341 8
properties.go
in proto
213 8
descriptor.go
in descriptor
115 7
Files With Long Lines (Top 17)

There are 17 files with lines longer than 120 characters. In total, there are 187 long lines.

File# lines# units# long lines
test.pb.go
in internal/testprotos/proto2_proto
3736 656 108
test.pb.go
in internal/testprotos/proto3_proto
497 90 23
test2.pb.go
in internal/testprotos/jsonpb_proto
1110 206 14
test3.pb.go
in internal/testprotos/jsonpb_proto
323 63 11
generator.go
in protoc-gen-go/generator
2125 113 6
grpc.go
in internal/gengogrpc
341 8 5
grpc.go
in protoc-gen-go/grpc
411 17 4
decode.go
in jsonpb
440 14 4
encode.go
in jsonpb
464 11 2
extensions.go
in proto
256 14 2
text_encode.go
in proto
490 19 2
descriptor.go
in descriptor
115 7 1
descriptor.pb.go
in protoc-gen-go/descriptor
155 2 1
test.bash
in root
28 - 1
json.go
in jsonpb
45 6 1
text_decode.go
in proto
687 21 1
registry.go
in proto
200 14 1