Skip to content

Commit

Permalink
Reflect feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerwins committed Mar 22, 2024
1 parent a74b0c1 commit f0cda64
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 28 deletions.
10 changes: 5 additions & 5 deletions pkg/document/crdt/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ func NewTreeNode(id *TreeNodeID, nodeType string, attributes *RHT, value ...stri
return node
}

// ToIDString returns a string that can be used as an ID for this TreeNodeID.
func (t *TreeNodeID) ToIDString() string {
// toIDString returns a string that can be used as an ID for this TreeNodeID.
func (t *TreeNodeID) toIDString() string {
return t.CreatedAt.ToTestString() + ":" + strconv.Itoa(t.Offset)
}

Expand Down Expand Up @@ -471,7 +471,7 @@ func (t *Tree) purgeNode(node *TreeNode) error {
node.InsPrevID = nil
node.InsNextID = nil

delete(t.removedNodeMap, node.ID.ToIDString())
delete(t.removedNodeMap, node.ID.toIDString())
return nil
}

Expand Down Expand Up @@ -651,7 +651,7 @@ func (t *Tree) Edit(
// 02. Delete: delete the nodes that are marked as removed.
for _, node := range toBeRemoveds {
if node.remove(editedAt) {
t.removedNodeMap[node.ID.ToIDString()] = node
t.removedNodeMap[node.ID.toIDString()] = node
}
}

Expand Down Expand Up @@ -702,7 +702,7 @@ func (t *Tree) Edit(
createdAtMapByActor[actorIDHex] = createdAt
}
}
t.removedNodeMap[node.Value.ID.ToIDString()] = node.Value
t.removedNodeMap[node.Value.ID.toIDString()] = node.Value
}

t.NodeMapByID.Put(node.Value.ID, node.Value)
Expand Down
27 changes: 4 additions & 23 deletions pkg/document/crdt/tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,9 @@ var (
}
)

type TreeNodePair struct {
treeNode *crdt.TreeNode
parentNodeID *crdt.TreeNodeID
}

func CollectNodesWithParentID(node *crdt.TreeNode, parentNodeID *crdt.TreeNodeID) []TreeNodePair {
var list []TreeNodePair

list = append(list, TreeNodePair{node, parentNodeID})
for _, child := range node.Index.Children(true) {
list = append(list, CollectNodesWithParentID(child.Value, node.ID)...)
}
return list
}

func assertEqualTreeNode(t *testing.T, nodeA, nodeB *crdt.TreeNode) {
listA := CollectNodesWithParentID(nodeA, nil)
listB := CollectNodesWithParentID(nodeB, nil)
assert.Equal(t, listA, listB)
}

func createHelloTree(t *testing.T, ctx *change.Context) *crdt.Tree {
// TODO(raararaara): This test should be generalized. e.g) createTree(ctx, "<r><p>hello</p></r>")
// https://pkg.go.dev/encoding/xml#Unmarshal
tree := crdt.NewTree(crdt.NewTreeNode(helper.PosT(ctx), "r", nil), helper.TimeT(ctx))
_, err := tree.EditT(0, 0, []*crdt.TreeNode{
crdt.NewTreeNode(helper.PosT(ctx), "p", nil),
Expand Down Expand Up @@ -160,7 +141,7 @@ func TestTreeNode(t *testing.T) {
// 03. Make a deep copy of the root and check if the node is the same as the original.
clone, err := tree.Root().DeepCopy()
assert.NoError(t, err)
assertEqualTreeNode(t, tree.Root(), clone)
helper.AssertEqualTreeNode(t, tree.Root(), clone)
})

t.Run("deepcopy test with split", func(t *testing.T) {
Expand All @@ -176,7 +157,7 @@ func TestTreeNode(t *testing.T) {
// 03. Make a deep copy of the root and check if the node is the same as the original.
clone, err := tree.Root().DeepCopy()
assert.NoError(t, err)
assertEqualTreeNode(t, tree.Root(), clone)
helper.AssertEqualTreeNode(t, tree.Root(), clone)
})
}

Expand Down
22 changes: 22 additions & 0 deletions test/helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,28 @@ func BuildTreeNode(node *json.TreeNode) *crdt.TreeNode {
return doc.Root().GetTree("test").Root()
}

type treeNodePair struct {
node *crdt.TreeNode
parentID *crdt.TreeNodeID
}

func createTreeNodePairs(node *crdt.TreeNode, parentID *crdt.TreeNodeID) []treeNodePair {
var pairs []treeNodePair

pairs = append(pairs, treeNodePair{node, parentID})
for _, child := range node.Index.Children(true) {
pairs = append(pairs, createTreeNodePairs(child.Value, node.ID)...)
}
return pairs
}

// AssertEqualTreeNode asserts that the given TreeNodes are equal.
func AssertEqualTreeNode(t *testing.T, nodeA, nodeB *crdt.TreeNode) {
pairsA := createTreeNodePairs(nodeA, nil)
pairsB := createTreeNodePairs(nodeB, nil)
assert.Equal(t, pairsA, pairsB)
}

var portOffset = 0

// TestConfig returns config for creating Yorkie instance.
Expand Down

1 comment on commit f0cda64

@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: f0cda64 Previous: ead0435 Ratio
BenchmarkDocument/constructor_test 1408 ns/op 1224 B/op 21 allocs/op 1367 ns/op 1224 B/op 21 allocs/op 1.03
BenchmarkDocument/constructor_test - ns/op 1408 ns/op 1367 ns/op 1.03
BenchmarkDocument/constructor_test - B/op 1224 B/op 1224 B/op 1
BenchmarkDocument/constructor_test - allocs/op 21 allocs/op 21 allocs/op 1
BenchmarkDocument/status_test 847.6 ns/op 1192 B/op 19 allocs/op 839.2 ns/op 1192 B/op 19 allocs/op 1.01
BenchmarkDocument/status_test - ns/op 847.6 ns/op 839.2 ns/op 1.01
BenchmarkDocument/status_test - B/op 1192 B/op 1192 B/op 1
BenchmarkDocument/status_test - allocs/op 19 allocs/op 19 allocs/op 1
BenchmarkDocument/equals_test 8370 ns/op 6977 B/op 124 allocs/op 7356 ns/op 6977 B/op 124 allocs/op 1.14
BenchmarkDocument/equals_test - ns/op 8370 ns/op 7356 ns/op 1.14
BenchmarkDocument/equals_test - B/op 6977 B/op 6977 B/op 1
BenchmarkDocument/equals_test - allocs/op 124 allocs/op 124 allocs/op 1
BenchmarkDocument/nested_update_test 16738 ns/op 12058 B/op 260 allocs/op 16679 ns/op 12059 B/op 260 allocs/op 1.00
BenchmarkDocument/nested_update_test - ns/op 16738 ns/op 16679 ns/op 1.00
BenchmarkDocument/nested_update_test - B/op 12058 B/op 12059 B/op 1.00
BenchmarkDocument/nested_update_test - allocs/op 260 allocs/op 260 allocs/op 1
BenchmarkDocument/delete_test 22399 ns/op 15283 B/op 339 allocs/op 22375 ns/op 15284 B/op 339 allocs/op 1.00
BenchmarkDocument/delete_test - ns/op 22399 ns/op 22375 ns/op 1.00
BenchmarkDocument/delete_test - B/op 15283 B/op 15284 B/op 1.00
BenchmarkDocument/delete_test - allocs/op 339 allocs/op 339 allocs/op 1
BenchmarkDocument/object_test 8430 ns/op 6753 B/op 118 allocs/op 8494 ns/op 6753 B/op 118 allocs/op 0.99
BenchmarkDocument/object_test - ns/op 8430 ns/op 8494 ns/op 0.99
BenchmarkDocument/object_test - B/op 6753 B/op 6753 B/op 1
BenchmarkDocument/object_test - allocs/op 118 allocs/op 118 allocs/op 1
BenchmarkDocument/array_test 28843 ns/op 11882 B/op 274 allocs/op 32383 ns/op 11883 B/op 274 allocs/op 0.89
BenchmarkDocument/array_test - ns/op 28843 ns/op 32383 ns/op 0.89
BenchmarkDocument/array_test - B/op 11882 B/op 11883 B/op 1.00
BenchmarkDocument/array_test - allocs/op 274 allocs/op 274 allocs/op 1
BenchmarkDocument/text_test 30379 ns/op 14916 B/op 470 allocs/op 30528 ns/op 14916 B/op 470 allocs/op 1.00
BenchmarkDocument/text_test - ns/op 30379 ns/op 30528 ns/op 1.00
BenchmarkDocument/text_test - B/op 14916 B/op 14916 B/op 1
BenchmarkDocument/text_test - allocs/op 470 allocs/op 470 allocs/op 1
BenchmarkDocument/text_composition_test 28615 ns/op 18430 B/op 479 allocs/op 29442 ns/op 18429 B/op 479 allocs/op 0.97
BenchmarkDocument/text_composition_test - ns/op 28615 ns/op 29442 ns/op 0.97
BenchmarkDocument/text_composition_test - B/op 18430 B/op 18429 B/op 1.00
BenchmarkDocument/text_composition_test - allocs/op 479 allocs/op 479 allocs/op 1
BenchmarkDocument/rich_text_test 79910 ns/op 38677 B/op 1149 allocs/op 80963 ns/op 38677 B/op 1149 allocs/op 0.99
BenchmarkDocument/rich_text_test - ns/op 79910 ns/op 80963 ns/op 0.99
BenchmarkDocument/rich_text_test - B/op 38677 B/op 38677 B/op 1
BenchmarkDocument/rich_text_test - allocs/op 1149 allocs/op 1149 allocs/op 1
BenchmarkDocument/counter_test 17195 ns/op 10658 B/op 242 allocs/op 17165 ns/op 10658 B/op 242 allocs/op 1.00
BenchmarkDocument/counter_test - ns/op 17195 ns/op 17165 ns/op 1.00
BenchmarkDocument/counter_test - B/op 10658 B/op 10658 B/op 1
BenchmarkDocument/counter_test - allocs/op 242 allocs/op 242 allocs/op 1
BenchmarkDocument/text_edit_gc_100 2883725 ns/op 1658607 B/op 17094 allocs/op 2896358 ns/op 1658593 B/op 17094 allocs/op 1.00
BenchmarkDocument/text_edit_gc_100 - ns/op 2883725 ns/op 2896358 ns/op 1.00
BenchmarkDocument/text_edit_gc_100 - B/op 1658607 B/op 1658593 B/op 1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op 17094 allocs/op 17094 allocs/op 1
BenchmarkDocument/text_edit_gc_1000 228625665 ns/op 144383283 B/op 200940 allocs/op 233281679 ns/op 144379088 B/op 200925 allocs/op 0.98
BenchmarkDocument/text_edit_gc_1000 - ns/op 228625665 ns/op 233281679 ns/op 0.98
BenchmarkDocument/text_edit_gc_1000 - B/op 144383283 B/op 144379088 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 200940 allocs/op 200925 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 3406513 ns/op 2317033 B/op 16197 allocs/op 3431054 ns/op 2317032 B/op 16196 allocs/op 0.99
BenchmarkDocument/text_split_gc_100 - ns/op 3406513 ns/op 3431054 ns/op 0.99
BenchmarkDocument/text_split_gc_100 - B/op 2317033 B/op 2317032 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 16197 allocs/op 16196 allocs/op 1.00
BenchmarkDocument/text_split_gc_1000 295112354 ns/op 228915824 B/op 203920 allocs/op 295388054 ns/op 228921716 B/op 203957 allocs/op 1.00
BenchmarkDocument/text_split_gc_1000 - ns/op 295112354 ns/op 295388054 ns/op 1.00
BenchmarkDocument/text_split_gc_1000 - B/op 228915824 B/op 228921716 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 203920 allocs/op 203957 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 11046268 ns/op 5811028 B/op 40677 allocs/op 10885877 ns/op 5810348 B/op 40674 allocs/op 1.01
BenchmarkDocument/text_delete_all_10000 - ns/op 11046268 ns/op 10885877 ns/op 1.01
BenchmarkDocument/text_delete_all_10000 - B/op 5811028 B/op 5810348 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 40677 allocs/op 40674 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 180167083 ns/op 81889048 B/op 411577 allocs/op 190431495 ns/op 81882562 B/op 411539 allocs/op 0.95
BenchmarkDocument/text_delete_all_100000 - ns/op 180167083 ns/op 190431495 ns/op 0.95
BenchmarkDocument/text_delete_all_100000 - B/op 81889048 B/op 81882562 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 411577 allocs/op 411539 allocs/op 1.00
BenchmarkDocument/text_100 225202 ns/op 120138 B/op 5082 allocs/op 216483 ns/op 120137 B/op 5082 allocs/op 1.04
BenchmarkDocument/text_100 - ns/op 225202 ns/op 216483 ns/op 1.04
BenchmarkDocument/text_100 - B/op 120138 B/op 120137 B/op 1.00
BenchmarkDocument/text_100 - allocs/op 5082 allocs/op 5082 allocs/op 1
BenchmarkDocument/text_1000 2396145 ns/op 1169126 B/op 50086 allocs/op 2367033 ns/op 1169125 B/op 50086 allocs/op 1.01
BenchmarkDocument/text_1000 - ns/op 2396145 ns/op 2367033 ns/op 1.01
BenchmarkDocument/text_1000 - B/op 1169126 B/op 1169125 B/op 1.00
BenchmarkDocument/text_1000 - allocs/op 50086 allocs/op 50086 allocs/op 1
BenchmarkDocument/array_1000 1249650 ns/op 1091304 B/op 11829 allocs/op 1199833 ns/op 1091448 B/op 11830 allocs/op 1.04
BenchmarkDocument/array_1000 - ns/op 1249650 ns/op 1199833 ns/op 1.04
BenchmarkDocument/array_1000 - B/op 1091304 B/op 1091448 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11829 allocs/op 11830 allocs/op 1.00
BenchmarkDocument/array_10000 13290436 ns/op 9801455 B/op 120299 allocs/op 13238137 ns/op 9800334 B/op 120296 allocs/op 1.00
BenchmarkDocument/array_10000 - ns/op 13290436 ns/op 13238137 ns/op 1.00
BenchmarkDocument/array_10000 - B/op 9801455 B/op 9800334 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120299 allocs/op 120296 allocs/op 1.00
BenchmarkDocument/array_gc_100 152527 ns/op 132657 B/op 1258 allocs/op 144816 ns/op 132661 B/op 1259 allocs/op 1.05
BenchmarkDocument/array_gc_100 - ns/op 152527 ns/op 144816 ns/op 1.05
BenchmarkDocument/array_gc_100 - B/op 132657 B/op 132661 B/op 1.00
BenchmarkDocument/array_gc_100 - allocs/op 1258 allocs/op 1259 allocs/op 1.00
BenchmarkDocument/array_gc_1000 1409859 ns/op 1159115 B/op 12875 allocs/op 1373130 ns/op 1159056 B/op 12874 allocs/op 1.03
BenchmarkDocument/array_gc_1000 - ns/op 1409859 ns/op 1373130 ns/op 1.03
BenchmarkDocument/array_gc_1000 - B/op 1159115 B/op 1159056 B/op 1.00
BenchmarkDocument/array_gc_1000 - allocs/op 12875 allocs/op 12874 allocs/op 1.00
BenchmarkDocument/counter_1000 209347 ns/op 193013 B/op 5769 allocs/op 197616 ns/op 193011 B/op 5769 allocs/op 1.06
BenchmarkDocument/counter_1000 - ns/op 209347 ns/op 197616 ns/op 1.06
BenchmarkDocument/counter_1000 - B/op 193013 B/op 193011 B/op 1.00
BenchmarkDocument/counter_1000 - allocs/op 5769 allocs/op 5769 allocs/op 1
BenchmarkDocument/counter_10000 2209204 ns/op 2087944 B/op 59776 allocs/op 2142066 ns/op 2087940 B/op 59776 allocs/op 1.03
BenchmarkDocument/counter_10000 - ns/op 2209204 ns/op 2142066 ns/op 1.03
BenchmarkDocument/counter_10000 - B/op 2087944 B/op 2087940 B/op 1.00
BenchmarkDocument/counter_10000 - allocs/op 59776 allocs/op 59776 allocs/op 1
BenchmarkDocument/object_1000 1422329 ns/op 1428036 B/op 9847 allocs/op 1349097 ns/op 1428086 B/op 9847 allocs/op 1.05
BenchmarkDocument/object_1000 - ns/op 1422329 ns/op 1349097 ns/op 1.05
BenchmarkDocument/object_1000 - B/op 1428036 B/op 1428086 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9847 allocs/op 9847 allocs/op 1
BenchmarkDocument/object_10000 15222058 ns/op 12168916 B/op 100566 allocs/op 15050225 ns/op 12166576 B/op 100562 allocs/op 1.01
BenchmarkDocument/object_10000 - ns/op 15222058 ns/op 15050225 ns/op 1.01
BenchmarkDocument/object_10000 - B/op 12168916 B/op 12166576 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 100566 allocs/op 100562 allocs/op 1.00
BenchmarkDocument/tree_100 1069805 ns/op 943782 B/op 6102 allocs/op 1017983 ns/op 943779 B/op 6102 allocs/op 1.05
BenchmarkDocument/tree_100 - ns/op 1069805 ns/op 1017983 ns/op 1.05
BenchmarkDocument/tree_100 - B/op 943782 B/op 943779 B/op 1.00
BenchmarkDocument/tree_100 - allocs/op 6102 allocs/op 6102 allocs/op 1
BenchmarkDocument/tree_1000 78463959 ns/op 86460566 B/op 60116 allocs/op 73944890 ns/op 86460540 B/op 60117 allocs/op 1.06
BenchmarkDocument/tree_1000 - ns/op 78463959 ns/op 73944890 ns/op 1.06
BenchmarkDocument/tree_1000 - B/op 86460566 B/op 86460540 B/op 1.00
BenchmarkDocument/tree_1000 - allocs/op 60116 allocs/op 60117 allocs/op 1.00
BenchmarkDocument/tree_10000 9675673568 ns/op 8580976288 B/op 600248 allocs/op 9653371595 ns/op 8580981472 B/op 600231 allocs/op 1.00
BenchmarkDocument/tree_10000 - ns/op 9675673568 ns/op 9653371595 ns/op 1.00
BenchmarkDocument/tree_10000 - B/op 8580976288 B/op 8580981472 B/op 1.00
BenchmarkDocument/tree_10000 - allocs/op 600248 allocs/op 600231 allocs/op 1.00
BenchmarkDocument/tree_delete_all_1000 77692923 ns/op 86990975 B/op 67755 allocs/op 74281693 ns/op 86991202 B/op 67753 allocs/op 1.05
BenchmarkDocument/tree_delete_all_1000 - ns/op 77692923 ns/op 74281693 ns/op 1.05
BenchmarkDocument/tree_delete_all_1000 - B/op 86990975 B/op 86991202 B/op 1.00
BenchmarkDocument/tree_delete_all_1000 - allocs/op 67755 allocs/op 67753 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_100 3786139 ns/op 4121142 B/op 14359 allocs/op 3685711 ns/op 4121091 B/op 14359 allocs/op 1.03
BenchmarkDocument/tree_edit_gc_100 - ns/op 3786139 ns/op 3685711 ns/op 1.03
BenchmarkDocument/tree_edit_gc_100 - B/op 4121142 B/op 4121091 B/op 1.00
BenchmarkDocument/tree_edit_gc_100 - allocs/op 14359 allocs/op 14359 allocs/op 1
BenchmarkDocument/tree_edit_gc_1000 309517652 ns/op 383466318 B/op 145413 allocs/op 303851166 ns/op 383466494 B/op 145407 allocs/op 1.02
BenchmarkDocument/tree_edit_gc_1000 - ns/op 309517652 ns/op 303851166 ns/op 1.02
BenchmarkDocument/tree_edit_gc_1000 - B/op 383466318 B/op 383466494 B/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 145413 allocs/op 145407 allocs/op 1.00
BenchmarkDocument/tree_split_gc_100 2566325 ns/op 2386965 B/op 10344 allocs/op 2482098 ns/op 2386947 B/op 10344 allocs/op 1.03
BenchmarkDocument/tree_split_gc_100 - ns/op 2566325 ns/op 2482098 ns/op 1.03
BenchmarkDocument/tree_split_gc_100 - B/op 2386965 B/op 2386947 B/op 1.00
BenchmarkDocument/tree_split_gc_100 - allocs/op 10344 allocs/op 10344 allocs/op 1
BenchmarkDocument/tree_split_gc_1000 191056302 ns/op 221992646 B/op 112270 allocs/op 182379023 ns/op 221992142 B/op 112263 allocs/op 1.05
BenchmarkDocument/tree_split_gc_1000 - ns/op 191056302 ns/op 182379023 ns/op 1.05
BenchmarkDocument/tree_split_gc_1000 - B/op 221992646 B/op 221992142 B/op 1.00
BenchmarkDocument/tree_split_gc_1000 - allocs/op 112270 allocs/op 112263 allocs/op 1.00
BenchmarkRPC/client_to_server 364686102 ns/op 18235816 B/op 170688 allocs/op 371381586 ns/op 16547896 B/op 170591 allocs/op 0.98
BenchmarkRPC/client_to_server - ns/op 364686102 ns/op 371381586 ns/op 0.98
BenchmarkRPC/client_to_server - B/op 18235816 B/op 16547896 B/op 1.10
BenchmarkRPC/client_to_server - allocs/op 170688 allocs/op 170591 allocs/op 1.00
BenchmarkRPC/client_to_client_via_server 624146565 ns/op 31906380 B/op 319096 allocs/op 638448000 ns/op 31109264 B/op 319261 allocs/op 0.98
BenchmarkRPC/client_to_client_via_server - ns/op 624146565 ns/op 638448000 ns/op 0.98
BenchmarkRPC/client_to_client_via_server - B/op 31906380 B/op 31109264 B/op 1.03
BenchmarkRPC/client_to_client_via_server - allocs/op 319096 allocs/op 319261 allocs/op 1.00
BenchmarkRPC/attach_large_document 1396679020 ns/op 1915479864 B/op 7627 allocs/op 1192269992 ns/op 1915484712 B/op 7639 allocs/op 1.17
BenchmarkRPC/attach_large_document - ns/op 1396679020 ns/op 1192269992 ns/op 1.17
BenchmarkRPC/attach_large_document - B/op 1915479864 B/op 1915484712 B/op 1.00
BenchmarkRPC/attach_large_document - allocs/op 7627 allocs/op 7639 allocs/op 1.00
BenchmarkRPC/adminCli_to_server 544170773 ns/op 36390420 B/op 289646 allocs/op 549017954 ns/op 36016364 B/op 289688 allocs/op 0.99
BenchmarkRPC/adminCli_to_server - ns/op 544170773 ns/op 549017954 ns/op 0.99
BenchmarkRPC/adminCli_to_server - B/op 36390420 B/op 36016364 B/op 1.01
BenchmarkRPC/adminCli_to_server - allocs/op 289646 allocs/op 289688 allocs/op 1.00
BenchmarkLocker 77.13 ns/op 16 B/op 1 allocs/op 66.6 ns/op 16 B/op 1 allocs/op 1.16
BenchmarkLocker - ns/op 77.13 ns/op 66.6 ns/op 1.16
BenchmarkLocker - B/op 16 B/op 16 B/op 1
BenchmarkLocker - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkLockerParallel 39.22 ns/op 0 B/op 0 allocs/op 38.75 ns/op 0 B/op 0 allocs/op 1.01
BenchmarkLockerParallel - ns/op 39.22 ns/op 38.75 ns/op 1.01
BenchmarkLockerParallel - B/op 0 B/op 0 B/op 1
BenchmarkLockerParallel - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkLockerMoreKeys 157.9 ns/op 15 B/op 0 allocs/op 153.2 ns/op 15 B/op 0 allocs/op 1.03
BenchmarkLockerMoreKeys - ns/op 157.9 ns/op 153.2 ns/op 1.03
BenchmarkLockerMoreKeys - B/op 15 B/op 15 B/op 1
BenchmarkLockerMoreKeys - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkChange/Push_10_Changes 3886989 ns/op 122325 B/op 1285 allocs/op 3945672 ns/op 122229 B/op 1285 allocs/op 0.99
BenchmarkChange/Push_10_Changes - ns/op 3886989 ns/op 3945672 ns/op 0.99
BenchmarkChange/Push_10_Changes - B/op 122325 B/op 122229 B/op 1.00
BenchmarkChange/Push_10_Changes - allocs/op 1285 allocs/op 1285 allocs/op 1
BenchmarkChange/Push_100_Changes 14557632 ns/op 598818 B/op 6658 allocs/op 14761047 ns/op 598123 B/op 6659 allocs/op 0.99
BenchmarkChange/Push_100_Changes - ns/op 14557632 ns/op 14761047 ns/op 0.99
BenchmarkChange/Push_100_Changes - B/op 598818 B/op 598123 B/op 1.00
BenchmarkChange/Push_100_Changes - allocs/op 6658 allocs/op 6659 allocs/op 1.00
BenchmarkChange/Push_1000_Changes 116721549 ns/op 5827692 B/op 63173 allocs/op 118725592 ns/op 5778244 B/op 63173 allocs/op 0.98
BenchmarkChange/Push_1000_Changes - ns/op 116721549 ns/op 118725592 ns/op 0.98
BenchmarkChange/Push_1000_Changes - B/op 5827692 B/op 5778244 B/op 1.01
BenchmarkChange/Push_1000_Changes - allocs/op 63173 allocs/op 63173 allocs/op 1
BenchmarkChange/Pull_10_Changes 2900747 ns/op 101279 B/op 1004 allocs/op 2951698 ns/op 100944 B/op 1005 allocs/op 0.98
BenchmarkChange/Pull_10_Changes - ns/op 2900747 ns/op 2951698 ns/op 0.98
BenchmarkChange/Pull_10_Changes - B/op 101279 B/op 100944 B/op 1.00
BenchmarkChange/Pull_10_Changes - allocs/op 1004 allocs/op 1005 allocs/op 1.00
BenchmarkChange/Pull_100_Changes 4399060 ns/op 267732 B/op 3476 allocs/op 4440625 ns/op 266628 B/op 3476 allocs/op 0.99
BenchmarkChange/Pull_100_Changes - ns/op 4399060 ns/op 4440625 ns/op 0.99
BenchmarkChange/Pull_100_Changes - B/op 267732 B/op 266628 B/op 1.00
BenchmarkChange/Pull_100_Changes - allocs/op 3476 allocs/op 3476 allocs/op 1
BenchmarkChange/Pull_1000_Changes 8921660 ns/op 1492628 B/op 29861 allocs/op 8957893 ns/op 1491084 B/op 29856 allocs/op 1.00
BenchmarkChange/Pull_1000_Changes - ns/op 8921660 ns/op 8957893 ns/op 1.00
BenchmarkChange/Pull_1000_Changes - B/op 1492628 B/op 1491084 B/op 1.00
BenchmarkChange/Pull_1000_Changes - allocs/op 29861 allocs/op 29856 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot 17271431 ns/op 760440 B/op 6664 allocs/op 17323957 ns/op 763780 B/op 6665 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - ns/op 17271431 ns/op 17323957 ns/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - B/op 760440 B/op 763780 B/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op 6664 allocs/op 6665 allocs/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot 121619566 ns/op 5899373 B/op 63174 allocs/op 122883538 ns/op 5750820 B/op 63173 allocs/op 0.99
BenchmarkSnapshot/Push_30KB_snapshot - ns/op 121619566 ns/op 122883538 ns/op 0.99
BenchmarkSnapshot/Push_30KB_snapshot - B/op 5899373 B/op 5750820 B/op 1.03
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op 63174 allocs/op 63173 allocs/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot 6716530 ns/op 926256 B/op 15517 allocs/op 6703192 ns/op 923694 B/op 15514 allocs/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op 6716530 ns/op 6703192 ns/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - B/op 926256 B/op 923694 B/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op 15517 allocs/op 15514 allocs/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot 15229925 ns/op 7174576 B/op 150116 allocs/op 15686228 ns/op 7178330 B/op 150120 allocs/op 0.97
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op 15229925 ns/op 15686228 ns/op 0.97
BenchmarkSnapshot/Pull_30KB_snapshot - B/op 7174576 B/op 7178330 B/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op 150116 allocs/op 150120 allocs/op 1.00
BenchmarkSync/memory_sync_10_test 6761 ns/op 1286 B/op 38 allocs/op 6991 ns/op 1286 B/op 38 allocs/op 0.97
BenchmarkSync/memory_sync_10_test - ns/op 6761 ns/op 6991 ns/op 0.97
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 51460 ns/op 8652 B/op 274 allocs/op 52118 ns/op 8656 B/op 274 allocs/op 0.99
BenchmarkSync/memory_sync_100_test - ns/op 51460 ns/op 52118 ns/op 0.99
BenchmarkSync/memory_sync_100_test - B/op 8652 B/op 8656 B/op 1.00
BenchmarkSync/memory_sync_100_test - allocs/op 274 allocs/op 274 allocs/op 1
BenchmarkSync/memory_sync_1000_test 580737 ns/op 74866 B/op 2140 allocs/op 591807 ns/op 74667 B/op 2126 allocs/op 0.98
BenchmarkSync/memory_sync_1000_test - ns/op 580737 ns/op 591807 ns/op 0.98
BenchmarkSync/memory_sync_1000_test - B/op 74866 B/op 74667 B/op 1.00
BenchmarkSync/memory_sync_1000_test - allocs/op 2140 allocs/op 2126 allocs/op 1.01
BenchmarkSync/memory_sync_10000_test 7486364 ns/op 746679 B/op 20359 allocs/op 7159530 ns/op 757631 B/op 20535 allocs/op 1.05
BenchmarkSync/memory_sync_10000_test - ns/op 7486364 ns/op 7159530 ns/op 1.05
BenchmarkSync/memory_sync_10000_test - B/op 746679 B/op 757631 B/op 0.99
BenchmarkSync/memory_sync_10000_test - allocs/op 20359 allocs/op 20535 allocs/op 0.99
BenchmarkTextEditing 18889468066 ns/op 9041928392 B/op 19922759 allocs/op 20537708488 ns/op 9042246592 B/op 19924523 allocs/op 0.92
BenchmarkTextEditing - ns/op 18889468066 ns/op 20537708488 ns/op 0.92
BenchmarkTextEditing - B/op 9041928392 B/op 9042246592 B/op 1.00
BenchmarkTextEditing - allocs/op 19922759 allocs/op 19924523 allocs/op 1.00

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

Please sign in to comment.