Skip to content

Commit

Permalink
Update tools
Browse files Browse the repository at this point in the history
  • Loading branch information
krapie committed Dec 11, 2023
1 parent 5e631a6 commit 4f23378
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 39 deletions.
21 changes: 4 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,13 @@ GO_LDFLAGS += -X ${GO_PROJECT}/internal/version.BuildDate=${BUILD_DATE}
default: help

tools: ## install tools for developing yorkie
go install github.com/gogo/protobuf/[email protected]
go install github.com/gogo/protobuf/[email protected]
go install github.com/bufbuild/buf/cmd/[email protected]
go install google.golang.org/protobuf/cmd/[email protected]
go install connectrpc.com/connect/cmd/[email protected]
go install github.com/golangci/golangci-lint/cmd/[email protected]

proto: ## generate proto files
protoc \
-I=./api \
-I=$(GOPATH)/src \
--gofast_out=plugins=grpc,\
Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,:./api/yorkie/v1 \
api/yorkie/v1/*.proto

protoset: ## generate protoset file
protoc \
-I=./api \
--descriptor_set_out=yorkie.protoset \
--include_imports \
api/yorkie/v1/*.proto
buf generate

build: ## builds an executable that runs in the current environment
CGO_ENABLED=0 go build -o $(EXECUTABLE) -ldflags "${GO_LDFLAGS}" ./cmd/yorkie
Expand Down
5 changes: 2 additions & 3 deletions api/yorkie/v1/admin.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions api/yorkie/v1/resources.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions api/yorkie/v1/v1connect/admin.connect.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions api/yorkie/v1/v1connect/yorkie.connect.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions api/yorkie/v1/yorkie.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ plugins:
- plugin: go
out: api
opt: paths=source_relative
# - plugin: gofast
# out: api
# opt: Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,:./api/yorkie/v1,plugins=grpc,paths=source_relative
- plugin: connect-go
out: api
opt: paths=source_relative
4 changes: 2 additions & 2 deletions test/integration/tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ func TestTree(t *testing.T) {
root.GetTree("t").EditBulk(3, 3, []*json.TreeNode{{
Type: "text",
Value: "c",
}, &json.TreeNode{
}, {
Type: "text",
Value: "d",
}}, 0)
Expand All @@ -451,7 +451,7 @@ func TestTree(t *testing.T) {
root.GetTree("t").EditBulk(4, 4, []*json.TreeNode{{
Type: "p",
Children: []json.TreeNode{{Type: "text", Value: "cd"}},
}, &json.TreeNode{
}, {
Type: "i",
Children: []json.TreeNode{{Type: "text", Value: "fg"}},
}}, 0)
Expand Down

1 comment on commit 4f23378

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go Benchmark

Benchmark suite Current: 4f23378 Previous: 3ebef65 Ratio
BenchmarkDocument/constructor_test - ns/op 1400 ns/op 1373 ns/op 1.02
BenchmarkDocument/constructor_test - B/op 1208 B/op 1208 B/op 1
BenchmarkDocument/constructor_test - allocs/op 20 allocs/op 20 allocs/op 1
BenchmarkDocument/status_test - ns/op 772.6 ns/op 796.5 ns/op 0.97
BenchmarkDocument/status_test - B/op 1176 B/op 1176 B/op 1
BenchmarkDocument/status_test - allocs/op 18 allocs/op 18 allocs/op 1
BenchmarkDocument/equals_test - ns/op 6961 ns/op 8302 ns/op 0.84
BenchmarkDocument/equals_test - B/op 6913 B/op 6913 B/op 1
BenchmarkDocument/equals_test - allocs/op 120 allocs/op 120 allocs/op 1
BenchmarkDocument/nested_update_test - ns/op 16063 ns/op 16598 ns/op 0.97
BenchmarkDocument/nested_update_test - B/op 11963 B/op 11962 B/op 1.00
BenchmarkDocument/nested_update_test - allocs/op 254 allocs/op 254 allocs/op 1
BenchmarkDocument/delete_test - ns/op 21669 ns/op 22626 ns/op 0.96
BenchmarkDocument/delete_test - B/op 15188 B/op 15188 B/op 1
BenchmarkDocument/delete_test - allocs/op 333 allocs/op 333 allocs/op 1
BenchmarkDocument/object_test - ns/op 8359 ns/op 8699 ns/op 0.96
BenchmarkDocument/object_test - B/op 6721 B/op 6721 B/op 1
BenchmarkDocument/object_test - allocs/op 116 allocs/op 116 allocs/op 1
BenchmarkDocument/array_test - ns/op 28326 ns/op 29401 ns/op 0.96
BenchmarkDocument/array_test - B/op 11819 B/op 11819 B/op 1
BenchmarkDocument/array_test - allocs/op 270 allocs/op 270 allocs/op 1
BenchmarkDocument/text_test - ns/op 29726 ns/op 31226 ns/op 0.95
BenchmarkDocument/text_test - B/op 14795 B/op 14795 B/op 1
BenchmarkDocument/text_test - allocs/op 468 allocs/op 468 allocs/op 1
BenchmarkDocument/text_composition_test - ns/op 27995 ns/op 29299 ns/op 0.96
BenchmarkDocument/text_composition_test - B/op 18278 B/op 18278 B/op 1
BenchmarkDocument/text_composition_test - allocs/op 477 allocs/op 477 allocs/op 1
BenchmarkDocument/rich_text_test - ns/op 79233 ns/op 82820 ns/op 0.96
BenchmarkDocument/rich_text_test - B/op 38540 B/op 38540 B/op 1
BenchmarkDocument/rich_text_test - allocs/op 1147 allocs/op 1147 allocs/op 1
BenchmarkDocument/counter_test - ns/op 16461 ns/op 17386 ns/op 0.95
BenchmarkDocument/counter_test - B/op 10210 B/op 10210 B/op 1
BenchmarkDocument/counter_test - allocs/op 236 allocs/op 236 allocs/op 1
BenchmarkDocument/text_edit_gc_100 - ns/op 2805083 ns/op 2970186 ns/op 0.94
BenchmarkDocument/text_edit_gc_100 - B/op 1655348 B/op 1655326 B/op 1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op 17093 allocs/op 17093 allocs/op 1
BenchmarkDocument/text_edit_gc_1000 - ns/op 221352119 ns/op 231735416 ns/op 0.96
BenchmarkDocument/text_edit_gc_1000 - B/op 144357668 B/op 144366033 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 200965 allocs/op 201007 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 - ns/op 3386961 ns/op 3385194 ns/op 1.00
BenchmarkDocument/text_split_gc_100 - B/op 2313616 B/op 2313331 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 16195 allocs/op 16194 allocs/op 1.00
BenchmarkDocument/text_split_gc_1000 - ns/op 279244256 ns/op 296761342 ns/op 0.94
BenchmarkDocument/text_split_gc_1000 - B/op 228878964 B/op 228881832 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 203896 allocs/op 203904 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 - ns/op 10678221 ns/op 11146892 ns/op 0.96
BenchmarkDocument/text_delete_all_10000 - B/op 5809633 B/op 5810543 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 40671 allocs/op 40675 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 - ns/op 178961804 ns/op 187188955 ns/op 0.96
BenchmarkDocument/text_delete_all_100000 - B/op 81895760 B/op 81887592 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 411590 allocs/op 411550 allocs/op 1.00
BenchmarkDocument/text_100 - ns/op 232559 ns/op 232235 ns/op 1.00
BenchmarkDocument/text_100 - B/op 118483 B/op 118483 B/op 1
BenchmarkDocument/text_100 - allocs/op 5080 allocs/op 5080 allocs/op 1
BenchmarkDocument/text_1000 - ns/op 2460544 ns/op 2502773 ns/op 0.98
BenchmarkDocument/text_1000 - B/op 1153071 B/op 1153073 B/op 1.00
BenchmarkDocument/text_1000 - allocs/op 50084 allocs/op 50084 allocs/op 1
BenchmarkDocument/array_1000 - ns/op 1201403 ns/op 1267389 ns/op 0.95
BenchmarkDocument/array_1000 - B/op 1091181 B/op 1091268 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11825 allocs/op 11826 allocs/op 1.00
BenchmarkDocument/array_10000 - ns/op 12469052 ns/op 13549731 ns/op 0.92
BenchmarkDocument/array_10000 - B/op 9799846 B/op 9800047 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120291 allocs/op 120291 allocs/op 1
BenchmarkDocument/array_gc_100 - ns/op 145548 ns/op 153664 ns/op 0.95
BenchmarkDocument/array_gc_100 - B/op 132492 B/op 132498 B/op 1.00
BenchmarkDocument/array_gc_100 - allocs/op 1248 allocs/op 1248 allocs/op 1
BenchmarkDocument/array_gc_1000 - ns/op 1388870 ns/op 1451255 ns/op 0.96
BenchmarkDocument/array_gc_1000 - B/op 1158948 B/op 1158965 B/op 1.00
BenchmarkDocument/array_gc_1000 - allocs/op 12865 allocs/op 12865 allocs/op 1
BenchmarkDocument/counter_1000 - ns/op 207680 ns/op 215664 ns/op 0.96
BenchmarkDocument/counter_1000 - B/op 192852 B/op 192852 B/op 1
BenchmarkDocument/counter_1000 - allocs/op 5765 allocs/op 5765 allocs/op 1
BenchmarkDocument/counter_10000 - ns/op 2090078 ns/op 2222359 ns/op 0.94
BenchmarkDocument/counter_10000 - B/op 2087781 B/op 2087783 B/op 1.00
BenchmarkDocument/counter_10000 - allocs/op 59772 allocs/op 59772 allocs/op 1
BenchmarkDocument/object_1000 - ns/op 1349087 ns/op 1433455 ns/op 0.94
BenchmarkDocument/object_1000 - B/op 1428136 B/op 1427946 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9845 allocs/op 9845 allocs/op 1
BenchmarkDocument/object_10000 - ns/op 14345486 ns/op 14878581 ns/op 0.96
BenchmarkDocument/object_10000 - B/op 12164488 B/op 12167003 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 100552 allocs/op 100561 allocs/op 1.00
BenchmarkDocument/tree_100 - ns/op 1033556 ns/op 722947 ns/op 1.43
BenchmarkDocument/tree_100 - B/op 943678 B/op 442891 B/op 2.13
BenchmarkDocument/tree_100 - allocs/op 6099 allocs/op 4506 allocs/op 1.35
BenchmarkDocument/tree_1000 - ns/op 75905217 ns/op 48715965 ns/op 1.56
BenchmarkDocument/tree_1000 - B/op 86460329 B/op 35222566 B/op 2.45
BenchmarkDocument/tree_1000 - allocs/op 60113 allocs/op 44119 allocs/op 1.36
BenchmarkDocument/tree_10000 - ns/op 9455189292 ns/op 6243742972 ns/op 1.51
BenchmarkDocument/tree_10000 - B/op 8580664296 B/op 3439193776 B/op 2.49
BenchmarkDocument/tree_10000 - allocs/op 600239 allocs/op 440204 allocs/op 1.36
BenchmarkDocument/tree_delete_all_1000 - ns/op 78418551 ns/op 50492483 ns/op 1.55
BenchmarkDocument/tree_delete_all_1000 - B/op 87013867 B/op 35687345 B/op 2.44
BenchmarkDocument/tree_delete_all_1000 - allocs/op 67752 allocs/op 51744 allocs/op 1.31
BenchmarkDocument/tree_edit_gc_100 - ns/op 3848377 ns/op 2674319 ns/op 1.44
BenchmarkDocument/tree_edit_gc_100 - B/op 4120956 B/op 2099522 B/op 1.96
BenchmarkDocument/tree_edit_gc_100 - allocs/op 14356 allocs/op 11165 allocs/op 1.29
BenchmarkDocument/tree_edit_gc_1000 - ns/op 316294504 ns/op 200656697 ns/op 1.58
BenchmarkDocument/tree_edit_gc_1000 - B/op 383466876 B/op 180293307 B/op 2.13
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 145419 allocs/op 113350 allocs/op 1.28
BenchmarkDocument/tree_split_gc_100 - ns/op 2521911 ns/op 1969140 ns/op 1.28
BenchmarkDocument/tree_split_gc_100 - B/op 2386839 B/op 1363475 B/op 1.75
BenchmarkDocument/tree_split_gc_100 - allocs/op 10341 allocs/op 8735 allocs/op 1.18
BenchmarkDocument/tree_split_gc_1000 - ns/op 194732554 ns/op 133034523 ns/op 1.46
BenchmarkDocument/tree_split_gc_1000 - B/op 221992076 B/op 120284053 B/op 1.85
BenchmarkDocument/tree_split_gc_1000 - allocs/op 112263 allocs/op 96193 allocs/op 1.17
BenchmarkRPC/client_to_server - ns/op 341601636 ns/op 356375965 ns/op 0.96
BenchmarkRPC/client_to_server - B/op 17525042 B/op 16323573 B/op 1.07
BenchmarkRPC/client_to_server - allocs/op 166977 allocs/op 165420 allocs/op 1.01
BenchmarkRPC/client_to_client_via_server - ns/op 587342857 ns/op 607723810 ns/op 0.97
BenchmarkRPC/client_to_client_via_server - B/op 32795900 B/op 34041892 B/op 0.96
BenchmarkRPC/client_to_client_via_server - allocs/op 312065 allocs/op 309871 allocs/op 1.01
BenchmarkRPC/attach_large_document - ns/op 1079673270 ns/op 1463602622 ns/op 0.74
BenchmarkRPC/attach_large_document - B/op 1889219504 B/op 1878647264 B/op 1.01
BenchmarkRPC/attach_large_document - allocs/op 7453 allocs/op 7043 allocs/op 1.06
BenchmarkRPC/adminCli_to_server - ns/op 523020765 ns/op 541741676 ns/op 0.97
BenchmarkRPC/adminCli_to_server - B/op 35814496 B/op 36380716 B/op 0.98
BenchmarkRPC/adminCli_to_server - allocs/op 288177 allocs/op 284616 allocs/op 1.01
BenchmarkLocker - ns/op 67.08 ns/op 65.29 ns/op 1.03
BenchmarkLocker - B/op 16 B/op 16 B/op 1
BenchmarkLocker - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkLockerParallel - ns/op 36.85 ns/op 38.64 ns/op 0.95
BenchmarkLockerParallel - B/op 0 B/op 0 B/op NaN
BenchmarkLockerParallel - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkLockerMoreKeys - ns/op 145.1 ns/op 138.5 ns/op 1.05
BenchmarkLockerMoreKeys - B/op 15 B/op 15 B/op 1
BenchmarkLockerMoreKeys - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkChange/Push_10_Changes - ns/op 3663222 ns/op 3779429 ns/op 0.97
BenchmarkChange/Push_10_Changes - B/op 126756 B/op 126275 B/op 1.00
BenchmarkChange/Push_10_Changes - allocs/op 1254 allocs/op 1254 allocs/op 1
BenchmarkChange/Push_100_Changes - ns/op 13952209 ns/op 14129092 ns/op 0.99
BenchmarkChange/Push_100_Changes - B/op 647795 B/op 646942 B/op 1.00
BenchmarkChange/Push_100_Changes - allocs/op 6538 allocs/op 6540 allocs/op 1.00
BenchmarkChange/Push_1000_Changes - ns/op 110589889 ns/op 113213707 ns/op 0.98
BenchmarkChange/Push_1000_Changes - B/op 6175078 B/op 6011043 B/op 1.03
BenchmarkChange/Push_1000_Changes - allocs/op 62159 allocs/op 62155 allocs/op 1.00
BenchmarkChange/Pull_10_Changes - ns/op 2796449 ns/op 2837624 ns/op 0.99
BenchmarkChange/Pull_10_Changes - B/op 101436 B/op 100327 B/op 1.01
BenchmarkChange/Pull_10_Changes - allocs/op 951 allocs/op 951 allocs/op 1
BenchmarkChange/Pull_100_Changes - ns/op 4232608 ns/op 4303014 ns/op 0.98
BenchmarkChange/Pull_100_Changes - B/op 259474 B/op 257269 B/op 1.01
BenchmarkChange/Pull_100_Changes - allocs/op 3155 allocs/op 3154 allocs/op 1.00
BenchmarkChange/Pull_1000_Changes - ns/op 8046139 ns/op 8473189 ns/op 0.95
BenchmarkChange/Pull_1000_Changes - B/op 1398621 B/op 1393414 B/op 1.00
BenchmarkChange/Pull_1000_Changes - allocs/op 26876 allocs/op 26869 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - ns/op 16496390 ns/op 16717315 ns/op 0.99
BenchmarkSnapshot/Push_3KB_snapshot - B/op 811195 B/op 807884 B/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op 6542 allocs/op 6541 allocs/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - ns/op 115558249 ns/op 117501595 ns/op 0.98
BenchmarkSnapshot/Push_30KB_snapshot - B/op 6283194 B/op 6250940 B/op 1.01
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op 62162 allocs/op 62161 allocs/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op 6501248 ns/op 6521588 ns/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - B/op 907741 B/op 904310 B/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op 14881 allocs/op 14878 allocs/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op 14320279 ns/op 15228711 ns/op 0.94
BenchmarkSnapshot/Pull_30KB_snapshot - B/op 6984949 B/op 6983077 B/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op 144138 allocs/op 144141 allocs/op 1.00
BenchmarkSync/memory_sync_10_test - ns/op 6646 ns/op 6917 ns/op 0.96
BenchmarkSync/memory_sync_10_test - B/op 1286 B/op 1286 B/op 1
BenchmarkSync/memory_sync_10_test - allocs/op 38 allocs/op 38 allocs/op 1
BenchmarkSync/memory_sync_100_test - ns/op 50842 ns/op 51493 ns/op 0.99
BenchmarkSync/memory_sync_100_test - B/op 8651 B/op 8650 B/op 1.00
BenchmarkSync/memory_sync_100_test - allocs/op 273 allocs/op 273 allocs/op 1
BenchmarkSync/memory_sync_1000_test - ns/op 585692 ns/op 598451 ns/op 0.98
BenchmarkSync/memory_sync_1000_test - B/op 74494 B/op 74330 B/op 1.00
BenchmarkSync/memory_sync_1000_test - allocs/op 2119 allocs/op 2108 allocs/op 1.01
BenchmarkSync/memory_sync_10000_test - ns/op 6933618 ns/op 7141413 ns/op 0.97
BenchmarkSync/memory_sync_10000_test - B/op 756764 B/op 761330 B/op 0.99
BenchmarkSync/memory_sync_10000_test - allocs/op 20551 allocs/op 20560 allocs/op 1.00
BenchmarkTextEditing - ns/op 18195212123 ns/op 19117165431 ns/op 0.95
BenchmarkTextEditing - B/op 9037767088 B/op 9037584392 B/op 1.00
BenchmarkTextEditing - allocs/op 19922387 allocs/op 19921383 allocs/op 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.