-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix incorrect tree snapshot encoding/decoding #881
Conversation
WalkthroughThe recent changes enhance the functionality of tree structures in the codebase. Key updates include adding new methods for calculating the size of tree nodes and descendants, as well as a new test case for encoding and decoding tree structures. These updates improve the manipulation, encoding, and decoding processes of tree structures, ensuring more accurate and efficient operations. Changes
Sequence Diagram(s) (Beta)Diagrams not generated as the changes are focused on enhancing existing functionalities and adding new methods without altering the core control flow significantly. Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Outside diff range and nitpick comments (1)
pkg/index/tree.go (1)
328-329
: Clarify the comment forUpdateAncestorsSize
.The comment for
UpdateAncestorsSize
could be more descriptive. It currently states "updates the size of ancestors," which is a bit vague. Consider specifying that it updates the cumulative size based on the node's size change.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- api/converter/converter_test.go (1 hunks)
- api/converter/from_pb.go (1 hunks)
- pkg/index/tree.go (4 hunks)
- pkg/llrb/llrb.go (1 hunks)
Additional context used
golangci-lint
api/converter/converter_test.go
[warning] 40-40: unused-parameter: parameter 'p' seems to be unused, consider removing or renaming it as _
[warning] 47-47: unused-parameter: parameter 'p' seems to be unused, consider removing or renaming it as _
[warning] 65-65: unused-parameter: parameter 'p' seems to be unused, consider removing or renaming it as _
Additional comments not posted (4)
pkg/llrb/llrb.go (1)
139-142
: The implementation of theLen()
method is correct and follows best practices for getter methods.api/converter/converter_test.go (1)
272-295
: The new test caseproperly encode and decode tree test
is well-written and covers the functionality of encoding and decoding tree structures effectively.api/converter/from_pb.go (1)
599-600
: The addition ofUpdateDescendantsSize
in theFromTreeNodes
method is a crucial enhancement for maintaining accurate size data of tree nodes.pkg/index/tree.go (1)
518-519
: Evaluate the newPrepend
method.The
Prepend
method correctly handles the insertion of nodes at the beginning of the children array and updates the parent reference. This method is specialized for creating nodes from snapshots, which aligns with the PR's objectives to fix tree snapshot encoding/decoding issues.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #881 +/- ##
==========================================
+ Coverage 50.52% 50.57% +0.04%
==========================================
Files 70 70
Lines 10419 10435 +16
==========================================
+ Hits 5264 5277 +13
- Misses 4625 4630 +5
+ Partials 530 528 -2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range and nitpick comments (1)
pkg/document/crdt/tree.go (1)
Line range hint
149-149
: Resolve undefined references in the code.+ import "github.com/yorkie-team/yorkie/pkg/document/rht" + import "github.com/yorkie-team/yorkie/pkg/document/gc" + import "github.com/yorkie-team/yorkie/pkg/document/element" + import "github.com/yorkie-team/yorkie/pkg/document/utils"Adding these imports will resolve the undefined references such as
RHT
,GCChild
,RHTNode
,GCPair
,Element
, andEscapeString
. This will ensure that all components referenced in the code are properly defined and accessible.Also applies to: 94-94, 262-262, 446-446, 455-455, 464-464, 516-516, 565-565, 575-575, 720-720, 225-225, 408-408, 448-448, 457-457, 543-543
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- api/converter/converter_test.go (1 hunks)
- pkg/document/crdt/tree.go (1 hunks)
- pkg/index/tree.go (4 hunks)
Files skipped from review as they are similar to previous changes (1)
- pkg/index/tree.go
Additional context used
golangci-lint
api/converter/converter_test.go
[warning] 40-40: unused-parameter: parameter 'p' seems to be unused, consider removing or renaming it as _
[warning] 47-47: unused-parameter: parameter 'p' seems to be unused, consider removing or renaming it as _
[warning] 65-65: unused-parameter: parameter 'p' seems to be unused, consider removing or renaming it as _
pkg/document/crdt/tree.go
149-149: undefined: RHT
94-94: undefined: RHT
262-262: undefined: GCChild
446-446: undefined: RHTNode
455-455: undefined: RHTNode
464-464: undefined: GCPair
516-516: undefined: GCChild
565-565: undefined: Element
575-575: undefined: GCPair
720-720: undefined: GCPair
225-225: undefined: EscapeString
408-408: undefined: RHT
448-448: undefined: NewRHT
457-457: undefined: NewRHT
543-543: undefined: EscapeString
Additional comments not posted (2)
api/converter/converter_test.go (1)
272-295
: Add a test to verify the correct encoding and decoding of tree structures.This test case is crucial for ensuring that the tree structures are encoded and decoded correctly, which aligns with the PR's objective to fix tree snapshot encoding/decoding issues.
pkg/document/crdt/tree.go (1)
644-647
: Implement theNodeLen
method to provide the size of the LLRBTree.This method is a valuable addition for efficiently retrieving the size of the tree, which is essential for operations that depend on the tree's size.
There was a problem hiding this comment.
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: 316d07d | Previous: dadc987 | Ratio |
---|---|---|---|
BenchmarkDocument/constructor_test |
1509 ns/op 1337 B/op 24 allocs/op |
1497 ns/op 1337 B/op 24 allocs/op |
1.01 |
BenchmarkDocument/constructor_test - ns/op |
1509 ns/op |
1497 ns/op |
1.01 |
BenchmarkDocument/constructor_test - B/op |
1337 B/op |
1337 B/op |
1 |
BenchmarkDocument/constructor_test - allocs/op |
24 allocs/op |
24 allocs/op |
1 |
BenchmarkDocument/status_test |
1036 ns/op 1305 B/op 22 allocs/op |
963.9 ns/op 1305 B/op 22 allocs/op |
1.07 |
BenchmarkDocument/status_test - ns/op |
1036 ns/op |
963.9 ns/op |
1.07 |
BenchmarkDocument/status_test - B/op |
1305 B/op |
1305 B/op |
1 |
BenchmarkDocument/status_test - allocs/op |
22 allocs/op |
22 allocs/op |
1 |
BenchmarkDocument/equals_test |
7588 ns/op 7273 B/op 132 allocs/op |
8687 ns/op 7273 B/op 132 allocs/op |
0.87 |
BenchmarkDocument/equals_test - ns/op |
7588 ns/op |
8687 ns/op |
0.87 |
BenchmarkDocument/equals_test - B/op |
7273 B/op |
7273 B/op |
1 |
BenchmarkDocument/equals_test - allocs/op |
132 allocs/op |
132 allocs/op |
1 |
BenchmarkDocument/nested_update_test |
16850 ns/op 12139 B/op 262 allocs/op |
16789 ns/op 12139 B/op 262 allocs/op |
1.00 |
BenchmarkDocument/nested_update_test - ns/op |
16850 ns/op |
16789 ns/op |
1.00 |
BenchmarkDocument/nested_update_test - B/op |
12139 B/op |
12139 B/op |
1 |
BenchmarkDocument/nested_update_test - allocs/op |
262 allocs/op |
262 allocs/op |
1 |
BenchmarkDocument/delete_test |
22687 ns/op 15363 B/op 341 allocs/op |
22576 ns/op 15363 B/op 341 allocs/op |
1.00 |
BenchmarkDocument/delete_test - ns/op |
22687 ns/op |
22576 ns/op |
1.00 |
BenchmarkDocument/delete_test - B/op |
15363 B/op |
15363 B/op |
1 |
BenchmarkDocument/delete_test - allocs/op |
341 allocs/op |
341 allocs/op |
1 |
BenchmarkDocument/object_test |
8508 ns/op 6817 B/op 120 allocs/op |
8589 ns/op 6817 B/op 120 allocs/op |
0.99 |
BenchmarkDocument/object_test - ns/op |
8508 ns/op |
8589 ns/op |
0.99 |
BenchmarkDocument/object_test - B/op |
6817 B/op |
6817 B/op |
1 |
BenchmarkDocument/object_test - allocs/op |
120 allocs/op |
120 allocs/op |
1 |
BenchmarkDocument/array_test |
29195 ns/op 11946 B/op 276 allocs/op |
28934 ns/op 11947 B/op 276 allocs/op |
1.01 |
BenchmarkDocument/array_test - ns/op |
29195 ns/op |
28934 ns/op |
1.01 |
BenchmarkDocument/array_test - B/op |
11946 B/op |
11947 B/op |
1.00 |
BenchmarkDocument/array_test - allocs/op |
276 allocs/op |
276 allocs/op |
1 |
BenchmarkDocument/text_test |
30595 ns/op 14715 B/op 469 allocs/op |
30542 ns/op 14715 B/op 469 allocs/op |
1.00 |
BenchmarkDocument/text_test - ns/op |
30595 ns/op |
30542 ns/op |
1.00 |
BenchmarkDocument/text_test - B/op |
14715 B/op |
14715 B/op |
1 |
BenchmarkDocument/text_test - allocs/op |
469 allocs/op |
469 allocs/op |
1 |
BenchmarkDocument/text_composition_test |
29157 ns/op 18420 B/op 484 allocs/op |
29065 ns/op 18422 B/op 484 allocs/op |
1.00 |
BenchmarkDocument/text_composition_test - ns/op |
29157 ns/op |
29065 ns/op |
1.00 |
BenchmarkDocument/text_composition_test - B/op |
18420 B/op |
18422 B/op |
1.00 |
BenchmarkDocument/text_composition_test - allocs/op |
484 allocs/op |
484 allocs/op |
1 |
BenchmarkDocument/rich_text_test |
80129 ns/op 38476 B/op 1148 allocs/op |
80024 ns/op 38476 B/op 1148 allocs/op |
1.00 |
BenchmarkDocument/rich_text_test - ns/op |
80129 ns/op |
80024 ns/op |
1.00 |
BenchmarkDocument/rich_text_test - B/op |
38476 B/op |
38476 B/op |
1 |
BenchmarkDocument/rich_text_test - allocs/op |
1148 allocs/op |
1148 allocs/op |
1 |
BenchmarkDocument/counter_test |
17261 ns/op 10722 B/op 244 allocs/op |
17325 ns/op 10722 B/op 244 allocs/op |
1.00 |
BenchmarkDocument/counter_test - ns/op |
17261 ns/op |
17325 ns/op |
1.00 |
BenchmarkDocument/counter_test - B/op |
10722 B/op |
10722 B/op |
1 |
BenchmarkDocument/counter_test - allocs/op |
244 allocs/op |
244 allocs/op |
1 |
BenchmarkDocument/text_edit_gc_100 |
1185851 ns/op 870861 B/op 16689 allocs/op |
1180110 ns/op 870822 B/op 16689 allocs/op |
1.00 |
BenchmarkDocument/text_edit_gc_100 - ns/op |
1185851 ns/op |
1180110 ns/op |
1.00 |
BenchmarkDocument/text_edit_gc_100 - B/op |
870861 B/op |
870822 B/op |
1.00 |
BenchmarkDocument/text_edit_gc_100 - allocs/op |
16689 allocs/op |
16689 allocs/op |
1 |
BenchmarkDocument/text_edit_gc_1000 |
48765766 ns/op 50536194 B/op 181604 allocs/op |
49523544 ns/op 50536276 B/op 181606 allocs/op |
0.98 |
BenchmarkDocument/text_edit_gc_1000 - ns/op |
48765766 ns/op |
49523544 ns/op |
0.98 |
BenchmarkDocument/text_edit_gc_1000 - B/op |
50536194 B/op |
50536276 B/op |
1.00 |
BenchmarkDocument/text_edit_gc_1000 - allocs/op |
181604 allocs/op |
181606 allocs/op |
1.00 |
BenchmarkDocument/text_split_gc_100 |
1790777 ns/op 1528739 B/op 15541 allocs/op |
1789824 ns/op 1528743 B/op 15541 allocs/op |
1.00 |
BenchmarkDocument/text_split_gc_100 - ns/op |
1790777 ns/op |
1789824 ns/op |
1.00 |
BenchmarkDocument/text_split_gc_100 - B/op |
1528739 B/op |
1528743 B/op |
1.00 |
BenchmarkDocument/text_split_gc_100 - allocs/op |
15541 allocs/op |
15541 allocs/op |
1 |
BenchmarkDocument/text_split_gc_1000 |
113392955 ns/op 135077583 B/op 182091 allocs/op |
113042216 ns/op 135075883 B/op 182086 allocs/op |
1.00 |
BenchmarkDocument/text_split_gc_1000 - ns/op |
113392955 ns/op |
113042216 ns/op |
1.00 |
BenchmarkDocument/text_split_gc_1000 - B/op |
135077583 B/op |
135075883 B/op |
1.00 |
BenchmarkDocument/text_split_gc_1000 - allocs/op |
182091 allocs/op |
182086 allocs/op |
1.00 |
BenchmarkDocument/text_delete_all_10000 |
15731960 ns/op 10181551 B/op 40669 allocs/op |
15925795 ns/op 10182655 B/op 40673 allocs/op |
0.99 |
BenchmarkDocument/text_delete_all_10000 - ns/op |
15731960 ns/op |
15925795 ns/op |
0.99 |
BenchmarkDocument/text_delete_all_10000 - B/op |
10181551 B/op |
10182655 B/op |
1.00 |
BenchmarkDocument/text_delete_all_10000 - allocs/op |
40669 allocs/op |
40673 allocs/op |
1.00 |
BenchmarkDocument/text_delete_all_100000 |
287262816 ns/op 142661372 B/op 411661 allocs/op |
294489822 ns/op 142644548 B/op 411611 allocs/op |
0.98 |
BenchmarkDocument/text_delete_all_100000 - ns/op |
287262816 ns/op |
294489822 ns/op |
0.98 |
BenchmarkDocument/text_delete_all_100000 - B/op |
142661372 B/op |
142644548 B/op |
1.00 |
BenchmarkDocument/text_delete_all_100000 - allocs/op |
411661 allocs/op |
411611 allocs/op |
1.00 |
BenchmarkDocument/text_100 |
219618 ns/op 120037 B/op 5081 allocs/op |
229110 ns/op 120037 B/op 5081 allocs/op |
0.96 |
BenchmarkDocument/text_100 - ns/op |
219618 ns/op |
229110 ns/op |
0.96 |
BenchmarkDocument/text_100 - B/op |
120037 B/op |
120037 B/op |
1 |
BenchmarkDocument/text_100 - allocs/op |
5081 allocs/op |
5081 allocs/op |
1 |
BenchmarkDocument/text_1000 |
2391472 ns/op 1169022 B/op 50085 allocs/op |
2419767 ns/op 1169024 B/op 50085 allocs/op |
0.99 |
BenchmarkDocument/text_1000 - ns/op |
2391472 ns/op |
2419767 ns/op |
0.99 |
BenchmarkDocument/text_1000 - B/op |
1169022 B/op |
1169024 B/op |
1.00 |
BenchmarkDocument/text_1000 - allocs/op |
50085 allocs/op |
50085 allocs/op |
1 |
BenchmarkDocument/array_1000 |
1270532 ns/op 1091430 B/op 11832 allocs/op |
1255018 ns/op 1091402 B/op 11832 allocs/op |
1.01 |
BenchmarkDocument/array_1000 - ns/op |
1270532 ns/op |
1255018 ns/op |
1.01 |
BenchmarkDocument/array_1000 - B/op |
1091430 B/op |
1091402 B/op |
1.00 |
BenchmarkDocument/array_1000 - allocs/op |
11832 allocs/op |
11832 allocs/op |
1 |
BenchmarkDocument/array_10000 |
13564154 ns/op 9800876 B/op 120301 allocs/op |
13359268 ns/op 9799543 B/op 120293 allocs/op |
1.02 |
BenchmarkDocument/array_10000 - ns/op |
13564154 ns/op |
13359268 ns/op |
1.02 |
BenchmarkDocument/array_10000 - B/op |
9800876 B/op |
9799543 B/op |
1.00 |
BenchmarkDocument/array_10000 - allocs/op |
120301 allocs/op |
120293 allocs/op |
1.00 |
BenchmarkDocument/array_gc_100 |
150980 ns/op 132731 B/op 1261 allocs/op |
154699 ns/op 132719 B/op 1260 allocs/op |
0.98 |
BenchmarkDocument/array_gc_100 - ns/op |
150980 ns/op |
154699 ns/op |
0.98 |
BenchmarkDocument/array_gc_100 - B/op |
132731 B/op |
132719 B/op |
1.00 |
BenchmarkDocument/array_gc_100 - allocs/op |
1261 allocs/op |
1260 allocs/op |
1.00 |
BenchmarkDocument/array_gc_1000 |
1455616 ns/op 1159156 B/op 12876 allocs/op |
1427526 ns/op 1159228 B/op 12877 allocs/op |
1.02 |
BenchmarkDocument/array_gc_1000 - ns/op |
1455616 ns/op |
1427526 ns/op |
1.02 |
BenchmarkDocument/array_gc_1000 - B/op |
1159156 B/op |
1159228 B/op |
1.00 |
BenchmarkDocument/array_gc_1000 - allocs/op |
12876 allocs/op |
12877 allocs/op |
1.00 |
BenchmarkDocument/counter_1000 |
201690 ns/op 193079 B/op 5771 allocs/op |
210499 ns/op 193081 B/op 5771 allocs/op |
0.96 |
BenchmarkDocument/counter_1000 - ns/op |
201690 ns/op |
210499 ns/op |
0.96 |
BenchmarkDocument/counter_1000 - B/op |
193079 B/op |
193081 B/op |
1.00 |
BenchmarkDocument/counter_1000 - allocs/op |
5771 allocs/op |
5771 allocs/op |
1 |
BenchmarkDocument/counter_10000 |
2212441 ns/op 2087998 B/op 59778 allocs/op |
2212748 ns/op 2088011 B/op 59778 allocs/op |
1.00 |
BenchmarkDocument/counter_10000 - ns/op |
2212441 ns/op |
2212748 ns/op |
1.00 |
BenchmarkDocument/counter_10000 - B/op |
2087998 B/op |
2088011 B/op |
1.00 |
BenchmarkDocument/counter_10000 - allocs/op |
59778 allocs/op |
59778 allocs/op |
1 |
BenchmarkDocument/object_1000 |
1385719 ns/op 1428209 B/op 9849 allocs/op |
1416107 ns/op 1428080 B/op 9849 allocs/op |
0.98 |
BenchmarkDocument/object_1000 - ns/op |
1385719 ns/op |
1416107 ns/op |
0.98 |
BenchmarkDocument/object_1000 - B/op |
1428209 B/op |
1428080 B/op |
1.00 |
BenchmarkDocument/object_1000 - allocs/op |
9849 allocs/op |
9849 allocs/op |
1 |
BenchmarkDocument/object_10000 |
15113601 ns/op 12164886 B/op 100557 allocs/op |
14897682 ns/op 12167007 B/op 100565 allocs/op |
1.01 |
BenchmarkDocument/object_10000 - ns/op |
15113601 ns/op |
14897682 ns/op |
1.01 |
BenchmarkDocument/object_10000 - B/op |
12164886 B/op |
12167007 B/op |
1.00 |
BenchmarkDocument/object_10000 - allocs/op |
100557 allocs/op |
100565 allocs/op |
1.00 |
BenchmarkDocument/tree_100 |
1022210 ns/op 943700 B/op 6101 allocs/op |
1072817 ns/op 943703 B/op 6101 allocs/op |
0.95 |
BenchmarkDocument/tree_100 - ns/op |
1022210 ns/op |
1072817 ns/op |
0.95 |
BenchmarkDocument/tree_100 - B/op |
943700 B/op |
943703 B/op |
1.00 |
BenchmarkDocument/tree_100 - allocs/op |
6101 allocs/op |
6101 allocs/op |
1 |
BenchmarkDocument/tree_1000 |
74226816 ns/op 86460332 B/op 60115 allocs/op |
78586810 ns/op 86460442 B/op 60115 allocs/op |
0.94 |
BenchmarkDocument/tree_1000 - ns/op |
74226816 ns/op |
78586810 ns/op |
0.94 |
BenchmarkDocument/tree_1000 - B/op |
86460332 B/op |
86460442 B/op |
1.00 |
BenchmarkDocument/tree_1000 - allocs/op |
60115 allocs/op |
60115 allocs/op |
1 |
BenchmarkDocument/tree_10000 |
9423586752 ns/op 8580671856 B/op 600241 allocs/op |
9567421492 ns/op 8580662048 B/op 600227 allocs/op |
0.98 |
BenchmarkDocument/tree_10000 - ns/op |
9423586752 ns/op |
9567421492 ns/op |
0.98 |
BenchmarkDocument/tree_10000 - B/op |
8580671856 B/op |
8580662048 B/op |
1.00 |
BenchmarkDocument/tree_10000 - allocs/op |
600241 allocs/op |
600227 allocs/op |
1.00 |
BenchmarkDocument/tree_delete_all_1000 |
76468236 ns/op 87508877 B/op 75264 allocs/op |
79121131 ns/op 87508832 B/op 75263 allocs/op |
0.97 |
BenchmarkDocument/tree_delete_all_1000 - ns/op |
76468236 ns/op |
79121131 ns/op |
0.97 |
BenchmarkDocument/tree_delete_all_1000 - B/op |
87508877 B/op |
87508832 B/op |
1.00 |
BenchmarkDocument/tree_delete_all_1000 - allocs/op |
75264 allocs/op |
75263 allocs/op |
1.00 |
BenchmarkDocument/tree_edit_gc_100 |
3734712 ns/op 4147736 B/op 15140 allocs/op |
4028788 ns/op 4146691 B/op 15141 allocs/op |
0.93 |
BenchmarkDocument/tree_edit_gc_100 - ns/op |
3734712 ns/op |
4028788 ns/op |
0.93 |
BenchmarkDocument/tree_edit_gc_100 - B/op |
4147736 B/op |
4146691 B/op |
1.00 |
BenchmarkDocument/tree_edit_gc_100 - allocs/op |
15140 allocs/op |
15141 allocs/op |
1.00 |
BenchmarkDocument/tree_edit_gc_1000 |
301490065 ns/op 383743312 B/op 154842 allocs/op |
311699975 ns/op 383744096 B/op 154845 allocs/op |
0.97 |
BenchmarkDocument/tree_edit_gc_1000 - ns/op |
301490065 ns/op |
311699975 ns/op |
0.97 |
BenchmarkDocument/tree_edit_gc_1000 - B/op |
383743312 B/op |
383744096 B/op |
1.00 |
BenchmarkDocument/tree_edit_gc_1000 - allocs/op |
154842 allocs/op |
154845 allocs/op |
1.00 |
BenchmarkDocument/tree_split_gc_100 |
2491128 ns/op 2412462 B/op 11125 allocs/op |
2618840 ns/op 2412488 B/op 11125 allocs/op |
0.95 |
BenchmarkDocument/tree_split_gc_100 - ns/op |
2491128 ns/op |
2618840 ns/op |
0.95 |
BenchmarkDocument/tree_split_gc_100 - B/op |
2412462 B/op |
2412488 B/op |
1.00 |
BenchmarkDocument/tree_split_gc_100 - allocs/op |
11125 allocs/op |
11125 allocs/op |
1 |
BenchmarkDocument/tree_split_gc_1000 |
184348231 ns/op 222250021 B/op 121992 allocs/op |
190484396 ns/op 222252258 B/op 122003 allocs/op |
0.97 |
BenchmarkDocument/tree_split_gc_1000 - ns/op |
184348231 ns/op |
190484396 ns/op |
0.97 |
BenchmarkDocument/tree_split_gc_1000 - B/op |
222250021 B/op |
222252258 B/op |
1.00 |
BenchmarkDocument/tree_split_gc_1000 - allocs/op |
121992 allocs/op |
122003 allocs/op |
1.00 |
BenchmarkRPC/client_to_server |
376150610 ns/op 16847021 B/op 174501 allocs/op |
380015052 ns/op 17092802 B/op 174510 allocs/op |
0.99 |
BenchmarkRPC/client_to_server - ns/op |
376150610 ns/op |
380015052 ns/op |
0.99 |
BenchmarkRPC/client_to_server - B/op |
16847021 B/op |
17092802 B/op |
0.99 |
BenchmarkRPC/client_to_server - allocs/op |
174501 allocs/op |
174510 allocs/op |
1.00 |
BenchmarkRPC/client_to_client_via_server |
631356078 ns/op 35267136 B/op 319357 allocs/op |
638856305 ns/op 32800684 B/op 319751 allocs/op |
0.99 |
BenchmarkRPC/client_to_client_via_server - ns/op |
631356078 ns/op |
638856305 ns/op |
0.99 |
BenchmarkRPC/client_to_client_via_server - B/op |
35267136 B/op |
32800684 B/op |
1.08 |
BenchmarkRPC/client_to_client_via_server - allocs/op |
319357 allocs/op |
319751 allocs/op |
1.00 |
BenchmarkRPC/attach_large_document |
1254895544 ns/op 1909415760 B/op 9010 allocs/op |
1300075715 ns/op 1896249200 B/op 8905 allocs/op |
0.97 |
BenchmarkRPC/attach_large_document - ns/op |
1254895544 ns/op |
1300075715 ns/op |
0.97 |
BenchmarkRPC/attach_large_document - B/op |
1909415760 B/op |
1896249200 B/op |
1.01 |
BenchmarkRPC/attach_large_document - allocs/op |
9010 allocs/op |
8905 allocs/op |
1.01 |
BenchmarkRPC/adminCli_to_server |
539288504 ns/op 35945924 B/op 289508 allocs/op |
546798628 ns/op 35945532 B/op 289516 allocs/op |
0.99 |
BenchmarkRPC/adminCli_to_server - ns/op |
539288504 ns/op |
546798628 ns/op |
0.99 |
BenchmarkRPC/adminCli_to_server - B/op |
35945924 B/op |
35945532 B/op |
1.00 |
BenchmarkRPC/adminCli_to_server - allocs/op |
289508 allocs/op |
289516 allocs/op |
1.00 |
BenchmarkLocker |
62.85 ns/op 16 B/op 1 allocs/op |
62.71 ns/op 16 B/op 1 allocs/op |
1.00 |
BenchmarkLocker - ns/op |
62.85 ns/op |
62.71 ns/op |
1.00 |
BenchmarkLocker - B/op |
16 B/op |
16 B/op |
1 |
BenchmarkLocker - allocs/op |
1 allocs/op |
1 allocs/op |
1 |
BenchmarkLockerParallel |
39.72 ns/op 0 B/op 0 allocs/op |
38.95 ns/op 0 B/op 0 allocs/op |
1.02 |
BenchmarkLockerParallel - ns/op |
39.72 ns/op |
38.95 ns/op |
1.02 |
BenchmarkLockerParallel - B/op |
0 B/op |
0 B/op |
1 |
BenchmarkLockerParallel - allocs/op |
0 allocs/op |
0 allocs/op |
1 |
BenchmarkLockerMoreKeys |
140.1 ns/op 15 B/op 0 allocs/op |
145.9 ns/op 15 B/op 0 allocs/op |
0.96 |
BenchmarkLockerMoreKeys - ns/op |
140.1 ns/op |
145.9 ns/op |
0.96 |
BenchmarkLockerMoreKeys - B/op |
15 B/op |
15 B/op |
1 |
BenchmarkLockerMoreKeys - allocs/op |
0 allocs/op |
0 allocs/op |
1 |
BenchmarkChange/Push_10_Changes |
3916747 ns/op 121345 B/op 1284 allocs/op |
3958098 ns/op 121360 B/op 1284 allocs/op |
0.99 |
BenchmarkChange/Push_10_Changes - ns/op |
3916747 ns/op |
3958098 ns/op |
0.99 |
BenchmarkChange/Push_10_Changes - B/op |
121345 B/op |
121360 B/op |
1.00 |
BenchmarkChange/Push_10_Changes - allocs/op |
1284 allocs/op |
1284 allocs/op |
1 |
BenchmarkChange/Push_100_Changes |
14703997 ns/op 571588 B/op 6654 allocs/op |
15092327 ns/op 571451 B/op 6654 allocs/op |
0.97 |
BenchmarkChange/Push_100_Changes - ns/op |
14703997 ns/op |
15092327 ns/op |
0.97 |
BenchmarkChange/Push_100_Changes - B/op |
571588 B/op |
571451 B/op |
1.00 |
BenchmarkChange/Push_100_Changes - allocs/op |
6654 allocs/op |
6654 allocs/op |
1 |
BenchmarkChange/Push_1000_Changes |
118296367 ns/op 5318027 B/op 63151 allocs/op |
119627947 ns/op 5257715 B/op 63150 allocs/op |
0.99 |
BenchmarkChange/Push_1000_Changes - ns/op |
118296367 ns/op |
119627947 ns/op |
0.99 |
BenchmarkChange/Push_1000_Changes - B/op |
5318027 B/op |
5257715 B/op |
1.01 |
BenchmarkChange/Push_1000_Changes - allocs/op |
63151 allocs/op |
63150 allocs/op |
1.00 |
BenchmarkChange/Pull_10_Changes |
2912455 ns/op 101016 B/op 1004 allocs/op |
2921308 ns/op 100748 B/op 1004 allocs/op |
1.00 |
BenchmarkChange/Pull_10_Changes - ns/op |
2912455 ns/op |
2921308 ns/op |
1.00 |
BenchmarkChange/Pull_10_Changes - B/op |
101016 B/op |
100748 B/op |
1.00 |
BenchmarkChange/Pull_10_Changes - allocs/op |
1004 allocs/op |
1004 allocs/op |
1 |
BenchmarkChange/Pull_100_Changes |
4366246 ns/op 266966 B/op 3476 allocs/op |
4343730 ns/op 266088 B/op 3475 allocs/op |
1.01 |
BenchmarkChange/Pull_100_Changes - ns/op |
4366246 ns/op |
4343730 ns/op |
1.01 |
BenchmarkChange/Pull_100_Changes - B/op |
266966 B/op |
266088 B/op |
1.00 |
BenchmarkChange/Pull_100_Changes - allocs/op |
3476 allocs/op |
3475 allocs/op |
1.00 |
BenchmarkChange/Pull_1000_Changes |
8605747 ns/op 1491003 B/op 29860 allocs/op |
8643665 ns/op 1491034 B/op 29861 allocs/op |
1.00 |
BenchmarkChange/Pull_1000_Changes - ns/op |
8605747 ns/op |
8643665 ns/op |
1.00 |
BenchmarkChange/Pull_1000_Changes - B/op |
1491003 B/op |
1491034 B/op |
1.00 |
BenchmarkChange/Pull_1000_Changes - allocs/op |
29860 allocs/op |
29861 allocs/op |
1.00 |
BenchmarkSnapshot/Push_3KB_snapshot |
16996617 ns/op 715282 B/op 6655 allocs/op |
17244912 ns/op 707421 B/op 6661 allocs/op |
0.99 |
BenchmarkSnapshot/Push_3KB_snapshot - ns/op |
16996617 ns/op |
17244912 ns/op |
0.99 |
BenchmarkSnapshot/Push_3KB_snapshot - B/op |
715282 B/op |
707421 B/op |
1.01 |
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op |
6655 allocs/op |
6661 allocs/op |
1.00 |
BenchmarkSnapshot/Push_30KB_snapshot |
121755663 ns/op 5551955 B/op 63155 allocs/op |
122366932 ns/op 5520118 B/op 63154 allocs/op |
1.00 |
BenchmarkSnapshot/Push_30KB_snapshot - ns/op |
121755663 ns/op |
122366932 ns/op |
1.00 |
BenchmarkSnapshot/Push_30KB_snapshot - B/op |
5551955 B/op |
5520118 B/op |
1.01 |
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op |
63155 allocs/op |
63154 allocs/op |
1.00 |
BenchmarkSnapshot/Pull_3KB_snapshot |
6462619 ns/op 923874 B/op 15512 allocs/op |
6428411 ns/op 922968 B/op 15514 allocs/op |
1.01 |
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op |
6462619 ns/op |
6428411 ns/op |
1.01 |
BenchmarkSnapshot/Pull_3KB_snapshot - B/op |
923874 B/op |
922968 B/op |
1.00 |
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op |
15512 allocs/op |
15514 allocs/op |
1.00 |
BenchmarkSnapshot/Pull_30KB_snapshot |
15089403 ns/op 7156752 B/op 150106 allocs/op |
16119512 ns/op 7155805 B/op 150104 allocs/op |
0.94 |
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op |
15089403 ns/op |
16119512 ns/op |
0.94 |
BenchmarkSnapshot/Pull_30KB_snapshot - B/op |
7156752 B/op |
7155805 B/op |
1.00 |
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op |
150106 allocs/op |
150104 allocs/op |
1.00 |
BenchmarkSync/memory_sync_10_test |
6817 ns/op 1286 B/op 38 allocs/op |
8171 ns/op 1286 B/op 38 allocs/op |
0.83 |
BenchmarkSync/memory_sync_10_test - ns/op |
6817 ns/op |
8171 ns/op |
0.83 |
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 |
50461 ns/op 8654 B/op 274 allocs/op |
52357 ns/op 8762 B/op 281 allocs/op |
0.96 |
BenchmarkSync/memory_sync_100_test - ns/op |
50461 ns/op |
52357 ns/op |
0.96 |
BenchmarkSync/memory_sync_100_test - B/op |
8654 B/op |
8762 B/op |
0.99 |
BenchmarkSync/memory_sync_100_test - allocs/op |
274 allocs/op |
281 allocs/op |
0.98 |
BenchmarkSync/memory_sync_1000_test |
585123 ns/op 74062 B/op 2103 allocs/op |
592864 ns/op 73995 B/op 2100 allocs/op |
0.99 |
BenchmarkSync/memory_sync_1000_test - ns/op |
585123 ns/op |
592864 ns/op |
0.99 |
BenchmarkSync/memory_sync_1000_test - B/op |
74062 B/op |
73995 B/op |
1.00 |
BenchmarkSync/memory_sync_1000_test - allocs/op |
2103 allocs/op |
2100 allocs/op |
1.00 |
BenchmarkSync/memory_sync_10000_test |
7122258 ns/op 736672 B/op 20294 allocs/op |
7307083 ns/op 742397 B/op 20292 allocs/op |
0.97 |
BenchmarkSync/memory_sync_10000_test - ns/op |
7122258 ns/op |
7307083 ns/op |
0.97 |
BenchmarkSync/memory_sync_10000_test - B/op |
736672 B/op |
742397 B/op |
0.99 |
BenchmarkSync/memory_sync_10000_test - allocs/op |
20294 allocs/op |
20292 allocs/op |
1.00 |
BenchmarkTextEditing |
4970538285 ns/op 3901950552 B/op 18743549 allocs/op |
4907700265 ns/op 3901962408 B/op 18743550 allocs/op |
1.01 |
BenchmarkTextEditing - ns/op |
4970538285 ns/op |
4907700265 ns/op |
1.01 |
BenchmarkTextEditing - B/op |
3901950552 B/op |
3901962408 B/op |
1.00 |
BenchmarkTextEditing - allocs/op |
18743549 allocs/op |
18743550 allocs/op |
1.00 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- api/converter/converter_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- api/converter/converter_test.go
What this PR does / why we need it:
Fix incorrect tree snapshot encoding/decoding
Which issue(s) this PR fixes:
Address yorkie-team/yorkie-js-sdk#836
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation:
Checklist:
Summary by CodeRabbit
New Features
Tests