Skip to content

Commit

Permalink
Simplify tree style test code
Browse files Browse the repository at this point in the history
  • Loading branch information
justiceHui committed Jan 18, 2024
1 parent 30a6007 commit 0b80f61
Showing 1 changed file with 27 additions and 81 deletions.
108 changes: 27 additions & 81 deletions test/integration/tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -700,11 +700,9 @@ func TestTree(t *testing.T) {
})

t.Run("set attributes test", func(t *testing.T) {
ctx := context.Background()
d1 := document.New(helper.TestDocKey(t))
assert.NoError(t, c1.Attach(ctx, d1))
doc := document.New(helper.TestDocKey(t))

assert.NoError(t, d1.Update(func(root *json.Object, p *presence.Presence) error {
assert.NoError(t, doc.Update(func(root *json.Object, p *presence.Presence) error {
root.SetNewTree("t", &json.TreeNode{
Type: "root",
Children: []json.TreeNode{
Expand All @@ -714,32 +712,21 @@ func TestTree(t *testing.T) {
})
return nil
}))
assert.NoError(t, c1.Sync(ctx))
assert.Equal(t, `<root><p>ab</p><p italic="true">cd</p></root>`, d1.Root().GetTree("t").ToXML())
assert.Equal(t, `<root><p>ab</p><p italic="true">cd</p></root>`, doc.Root().GetTree("t").ToXML())

assert.NoError(t, d1.Update(func(root *json.Object, p *presence.Presence) error {
assert.NoError(t, doc.Update(func(root *json.Object, p *presence.Presence) error {
// NOTE(sejongk): 0, 4 -> 0,1 / 3,4
root.GetTree("t").Style(0, 4, map[string]string{"bold": "true"})
return nil
}))

assert.NoError(t, c1.Sync(ctx))
d2 := document.New(helper.TestDocKey(t))
assert.NoError(t, c2.Attach(ctx, d2))

assert.Equal(t, `<root><p bold="true">ab</p><p italic="true">cd</p></root>`, d1.Root().GetTree("t").ToXML())
assert.Equal(t, `<root><p bold="true">ab</p><p italic="true">cd</p></root>`, d2.Root().GetTree("t").ToXML())

assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}],"attributes":{"bold":"true"}},{"type":"p","children":[{"type":"text","value":"cd"}],"attributes":{"italic":"true"}}]}`, d1.Root().GetTree("t").Marshal())
assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}],"attributes":{"bold":"true"}},{"type":"p","children":[{"type":"text","value":"cd"}],"attributes":{"italic":"true"}}]}`, d2.Root().GetTree("t").Marshal())
assert.Equal(t, `<root><p bold="true">ab</p><p italic="true">cd</p></root>`, doc.Root().GetTree("t").ToXML())
assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}],"attributes":{"bold":"true"}},{"type":"p","children":[{"type":"text","value":"cd"}],"attributes":{"italic":"true"}}]}`, doc.Root().GetTree("t").Marshal())
})

t.Run("remove attributes test", func(t *testing.T) {
ctx := context.Background()
d1 := document.New(helper.TestDocKey(t))
assert.NoError(t, c1.Attach(ctx, d1))
doc := document.New(helper.TestDocKey(t))

assert.NoError(t, d1.Update(func(root *json.Object, p *presence.Presence) error {
assert.NoError(t, doc.Update(func(root *json.Object, p *presence.Presence) error {
root.SetNewTree("t", &json.TreeNode{
Type: "root",
Children: []json.TreeNode{
Expand All @@ -749,46 +736,28 @@ func TestTree(t *testing.T) {
})
return nil
}))
assert.NoError(t, c1.Sync(ctx))
assert.Equal(t, `<root><p>ab</p><p italic="true">cd</p></root>`, d1.Root().GetTree("t").ToXML())
assert.Equal(t, `<root><p>ab</p><p italic="true">cd</p></root>`, doc.Root().GetTree("t").ToXML())

assert.NoError(t, d1.Update(func(root *json.Object, p *presence.Presence) error {
assert.NoError(t, doc.Update(func(root *json.Object, p *presence.Presence) error {
root.GetTree("t").RemoveStyle(4, 8, []string{"italic"})
return nil
}))

assert.NoError(t, c1.Sync(ctx))
d2 := document.New(helper.TestDocKey(t))
assert.NoError(t, c2.Attach(ctx, d2))

assert.Equal(t, `<root><p>ab</p><p>cd</p></root>`, d1.Root().GetTree("t").ToXML())
assert.Equal(t, `<root><p>ab</p><p>cd</p></root>`, d2.Root().GetTree("t").ToXML())

assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}]},{"type":"p","children":[{"type":"text","value":"cd"}]}]}`, d1.Root().GetTree("t").Marshal())
assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}]},{"type":"p","children":[{"type":"text","value":"cd"}]}]}`, d2.Root().GetTree("t").Marshal())
assert.Equal(t, `<root><p>ab</p><p>cd</p></root>`, doc.Root().GetTree("t").ToXML())
assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}]},{"type":"p","children":[{"type":"text","value":"cd"}]}]}`, doc.Root().GetTree("t").Marshal())

// remove not exist style
assert.NoError(t, d1.Update(func(root *json.Object, p *presence.Presence) error {
assert.NoError(t, doc.Update(func(root *json.Object, p *presence.Presence) error {
root.GetTree("t").RemoveStyle(4, 8, []string{"bold"})
return nil
}))

assert.NoError(t, c1.Sync(ctx))
assert.NoError(t, c2.Sync(ctx))

assert.Equal(t, `<root><p>ab</p><p>cd</p></root>`, d1.Root().GetTree("t").ToXML())
assert.Equal(t, `<root><p>ab</p><p>cd</p></root>`, d2.Root().GetTree("t").ToXML())

assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}]},{"type":"p","children":[{"type":"text","value":"cd"}]}]}`, d1.Root().GetTree("t").Marshal())
assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}]},{"type":"p","children":[{"type":"text","value":"cd"}]}]}`, d2.Root().GetTree("t").Marshal())
assert.Equal(t, `<root><p>ab</p><p>cd</p></root>`, doc.Root().GetTree("t").ToXML())
assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}]},{"type":"p","children":[{"type":"text","value":"cd"}]}]}`, doc.Root().GetTree("t").Marshal())
})

t.Run("set/remove style without any attributes", func(t *testing.T) {
ctx := context.Background()
d1 := document.New(helper.TestDocKey(t))
assert.NoError(t, c1.Attach(ctx, d1))
doc := document.New(helper.TestDocKey(t))

assert.NoError(t, d1.Update(func(root *json.Object, p *presence.Presence) error {
assert.NoError(t, doc.Update(func(root *json.Object, p *presence.Presence) error {
root.SetNewTree("t", &json.TreeNode{
Type: "root",
Children: []json.TreeNode{
Expand All @@ -798,52 +767,29 @@ func TestTree(t *testing.T) {
})
return nil
}))
assert.NoError(t, c1.Sync(ctx))
assert.Equal(t, `<root><p>ab</p><p italic="true">cd</p></root>`, d1.Root().GetTree("t").ToXML())
assert.Equal(t, `<root><p>ab</p><p italic="true">cd</p></root>`, doc.Root().GetTree("t").ToXML())

assert.NoError(t, d1.Update(func(root *json.Object, p *presence.Presence) error {
assert.NoError(t, doc.Update(func(root *json.Object, p *presence.Presence) error {
// NOTE(sejongk): 0, 4 -> 0,1 / 3,4
root.GetTree("t").Style(0, 4, map[string]string{})
return nil
}))
assert.Equal(t, `<root><p>ab</p><p italic="true">cd</p></root>`, doc.Root().GetTree("t").ToXML())
assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}]},{"type":"p","children":[{"type":"text","value":"cd"}],"attributes":{"italic":"true"}}]}`, doc.Root().GetTree("t").Marshal())

assert.NoError(t, c1.Sync(ctx))
d2 := document.New(helper.TestDocKey(t))
assert.NoError(t, c2.Attach(ctx, d2))

assert.Equal(t, `<root><p>ab</p><p italic="true">cd</p></root>`, d1.Root().GetTree("t").ToXML())
assert.Equal(t, `<root><p>ab</p><p italic="true">cd</p></root>`, d2.Root().GetTree("t").ToXML())

assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}]},{"type":"p","children":[{"type":"text","value":"cd"}],"attributes":{"italic":"true"}}]}`, d1.Root().GetTree("t").Marshal())
assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}]},{"type":"p","children":[{"type":"text","value":"cd"}],"attributes":{"italic":"true"}}]}`, d2.Root().GetTree("t").Marshal())

assert.NoError(t, d1.Update(func(root *json.Object, p *presence.Presence) error {
assert.NoError(t, doc.Update(func(root *json.Object, p *presence.Presence) error {
root.GetTree("t").RemoveStyle(4, 8, []string{"italic"})
return nil
}))
assert.Equal(t, `<root><p>ab</p><p>cd</p></root>`, doc.Root().GetTree("t").ToXML())
assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}]},{"type":"p","children":[{"type":"text","value":"cd"}]}]}`, doc.Root().GetTree("t").Marshal())

assert.NoError(t, c1.Sync(ctx))
assert.NoError(t, c2.Sync(ctx))

assert.Equal(t, `<root><p>ab</p><p>cd</p></root>`, d1.Root().GetTree("t").ToXML())
assert.Equal(t, `<root><p>ab</p><p>cd</p></root>`, d2.Root().GetTree("t").ToXML())

assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}]},{"type":"p","children":[{"type":"text","value":"cd"}]}]}`, d1.Root().GetTree("t").Marshal())
assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}]},{"type":"p","children":[{"type":"text","value":"cd"}]}]}`, d2.Root().GetTree("t").Marshal())

assert.NoError(t, d1.Update(func(root *json.Object, p *presence.Presence) error {
assert.NoError(t, doc.Update(func(root *json.Object, p *presence.Presence) error {
root.GetTree("t").RemoveStyle(4, 8, []string{})
return nil
}))

assert.NoError(t, c1.Sync(ctx))
assert.NoError(t, c2.Sync(ctx))

assert.Equal(t, `<root><p>ab</p><p>cd</p></root>`, d1.Root().GetTree("t").ToXML())
assert.Equal(t, `<root><p>ab</p><p>cd</p></root>`, d2.Root().GetTree("t").ToXML())

assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}]},{"type":"p","children":[{"type":"text","value":"cd"}]}]}`, d1.Root().GetTree("t").Marshal())
assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}]},{"type":"p","children":[{"type":"text","value":"cd"}]}]}`, d2.Root().GetTree("t").Marshal())
assert.Equal(t, `<root><p>ab</p><p>cd</p></root>`, doc.Root().GetTree("t").ToXML())
assert.Equal(t, `{"type":"root","children":[{"type":"p","children":[{"type":"text","value":"ab"}]},{"type":"p","children":[{"type":"text","value":"cd"}]}]}`, doc.Root().GetTree("t").Marshal())
})

// Concurrent editing, overlapping range test
Expand Down

1 comment on commit 0b80f61

@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: 0b80f61 Previous: 4ea4eae Ratio
BenchmarkDocument/constructor_test - ns/op 1402 ns/op 1336 ns/op 1.05
BenchmarkDocument/constructor_test - B/op 1224 B/op 1208 B/op 1.01
BenchmarkDocument/constructor_test - allocs/op 21 allocs/op 20 allocs/op 1.05
BenchmarkDocument/status_test - ns/op 842.7 ns/op 785.2 ns/op 1.07
BenchmarkDocument/status_test - B/op 1192 B/op 1176 B/op 1.01
BenchmarkDocument/status_test - allocs/op 19 allocs/op 18 allocs/op 1.06
BenchmarkDocument/equals_test - ns/op 7447 ns/op 7092 ns/op 1.05
BenchmarkDocument/equals_test - B/op 6977 B/op 6913 B/op 1.01
BenchmarkDocument/equals_test - allocs/op 124 allocs/op 120 allocs/op 1.03
BenchmarkDocument/nested_update_test - ns/op 18297 ns/op 16151 ns/op 1.13
BenchmarkDocument/nested_update_test - B/op 12059 B/op 11963 B/op 1.01
BenchmarkDocument/nested_update_test - allocs/op 260 allocs/op 254 allocs/op 1.02
BenchmarkDocument/delete_test - ns/op 22475 ns/op 21933 ns/op 1.02
BenchmarkDocument/delete_test - B/op 15283 B/op 15188 B/op 1.01
BenchmarkDocument/delete_test - allocs/op 339 allocs/op 333 allocs/op 1.02
BenchmarkDocument/object_test - ns/op 8502 ns/op 8361 ns/op 1.02
BenchmarkDocument/object_test - B/op 6753 B/op 6721 B/op 1.00
BenchmarkDocument/object_test - allocs/op 118 allocs/op 116 allocs/op 1.02
BenchmarkDocument/array_test - ns/op 28821 ns/op 32610 ns/op 0.88
BenchmarkDocument/array_test - B/op 11883 B/op 11819 B/op 1.01
BenchmarkDocument/array_test - allocs/op 274 allocs/op 270 allocs/op 1.01
BenchmarkDocument/text_test - ns/op 30530 ns/op 30219 ns/op 1.01
BenchmarkDocument/text_test - B/op 14918 B/op 14795 B/op 1.01
BenchmarkDocument/text_test - allocs/op 470 allocs/op 468 allocs/op 1.00
BenchmarkDocument/text_composition_test - ns/op 28693 ns/op 28748 ns/op 1.00
BenchmarkDocument/text_composition_test - B/op 18428 B/op 18278 B/op 1.01
BenchmarkDocument/text_composition_test - allocs/op 479 allocs/op 477 allocs/op 1.00
BenchmarkDocument/rich_text_test - ns/op 81177 ns/op 79589 ns/op 1.02
BenchmarkDocument/rich_text_test - B/op 38677 B/op 38540 B/op 1.00
BenchmarkDocument/rich_text_test - allocs/op 1149 allocs/op 1147 allocs/op 1.00
BenchmarkDocument/counter_test - ns/op 17317 ns/op 16595 ns/op 1.04
BenchmarkDocument/counter_test - B/op 10466 B/op 10210 B/op 1.03
BenchmarkDocument/counter_test - allocs/op 238 allocs/op 236 allocs/op 1.01
BenchmarkDocument/text_edit_gc_100 - ns/op 2951972 ns/op 2884438 ns/op 1.02
BenchmarkDocument/text_edit_gc_100 - B/op 1658522 B/op 1655268 B/op 1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op 17094 allocs/op 17093 allocs/op 1.00
BenchmarkDocument/text_edit_gc_1000 - ns/op 237995872 ns/op 230271811 ns/op 1.03
BenchmarkDocument/text_edit_gc_1000 - B/op 144377881 B/op 144376180 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 200926 allocs/op 201058 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 - ns/op 3472797 ns/op 3383745 ns/op 1.03
BenchmarkDocument/text_split_gc_100 - B/op 2317169 B/op 2314004 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 16197 allocs/op 16197 allocs/op 1
BenchmarkDocument/text_split_gc_1000 - ns/op 299106356 ns/op 288385837 ns/op 1.04
BenchmarkDocument/text_split_gc_1000 - B/op 228925252 B/op 228887600 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 203948 allocs/op 203930 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 - ns/op 11661133 ns/op 11000897 ns/op 1.06
BenchmarkDocument/text_delete_all_10000 - B/op 5810086 B/op 5809330 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 40672 allocs/op 40669 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 - ns/op 217591293 ns/op 182534409 ns/op 1.19
BenchmarkDocument/text_delete_all_100000 - B/op 81912925 B/op 81903677 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 411679 allocs/op 411647 allocs/op 1.00
BenchmarkDocument/text_100 - ns/op 223267 ns/op 218449 ns/op 1.02
BenchmarkDocument/text_100 - B/op 120137 B/op 118483 B/op 1.01
BenchmarkDocument/text_100 - allocs/op 5082 allocs/op 5080 allocs/op 1.00
BenchmarkDocument/text_1000 - ns/op 2446917 ns/op 2374004 ns/op 1.03
BenchmarkDocument/text_1000 - B/op 1169128 B/op 1153070 B/op 1.01
BenchmarkDocument/text_1000 - allocs/op 50086 allocs/op 50084 allocs/op 1.00
BenchmarkDocument/array_1000 - ns/op 1217537 ns/op 1196526 ns/op 1.02
BenchmarkDocument/array_1000 - B/op 1091349 B/op 1091301 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11830 allocs/op 11826 allocs/op 1.00
BenchmarkDocument/array_10000 - ns/op 13535116 ns/op 13416629 ns/op 1.01
BenchmarkDocument/array_10000 - B/op 9798829 B/op 9799640 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120290 allocs/op 120291 allocs/op 1.00
BenchmarkDocument/array_gc_100 - ns/op 146857 ns/op 143463 ns/op 1.02
BenchmarkDocument/array_gc_100 - B/op 132647 B/op 132481 B/op 1.00
BenchmarkDocument/array_gc_100 - allocs/op 1258 allocs/op 1248 allocs/op 1.01
BenchmarkDocument/array_gc_1000 - ns/op 1395834 ns/op 1378307 ns/op 1.01
BenchmarkDocument/array_gc_1000 - B/op 1159087 B/op 1158986 B/op 1.00
BenchmarkDocument/array_gc_1000 - allocs/op 12875 allocs/op 12865 allocs/op 1.00
BenchmarkDocument/counter_1000 - ns/op 212340 ns/op 198075 ns/op 1.07
BenchmarkDocument/counter_1000 - B/op 192916 B/op 192851 B/op 1.00
BenchmarkDocument/counter_1000 - allocs/op 5767 allocs/op 5765 allocs/op 1.00
BenchmarkDocument/counter_10000 - ns/op 2308594 ns/op 2156556 ns/op 1.07
BenchmarkDocument/counter_10000 - B/op 2087832 B/op 2087769 B/op 1.00
BenchmarkDocument/counter_10000 - allocs/op 59774 allocs/op 59772 allocs/op 1.00
BenchmarkDocument/object_1000 - ns/op 1403966 ns/op 1317018 ns/op 1.07
BenchmarkDocument/object_1000 - B/op 1428139 B/op 1427906 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9847 allocs/op 9845 allocs/op 1.00
BenchmarkDocument/object_10000 - ns/op 15042784 ns/op 14690867 ns/op 1.02
BenchmarkDocument/object_10000 - B/op 12165518 B/op 12166752 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 100559 allocs/op 100562 allocs/op 1.00
BenchmarkDocument/tree_100 - ns/op 1081081 ns/op 1009303 ns/op 1.07
BenchmarkDocument/tree_100 - B/op 943780 B/op 943675 B/op 1.00
BenchmarkDocument/tree_100 - allocs/op 6102 allocs/op 6099 allocs/op 1.00
BenchmarkDocument/tree_1000 - ns/op 78381325 ns/op 72072982 ns/op 1.09
BenchmarkDocument/tree_1000 - B/op 86460475 B/op 86459854 B/op 1.00
BenchmarkDocument/tree_1000 - allocs/op 60115 allocs/op 60114 allocs/op 1.00
BenchmarkDocument/tree_10000 - ns/op 9861396442 ns/op 9443141797 ns/op 1.04
BenchmarkDocument/tree_10000 - B/op 8580648912 B/op 8580991992 B/op 1.00
BenchmarkDocument/tree_10000 - allocs/op 600198 allocs/op 600248 allocs/op 1.00
BenchmarkDocument/tree_delete_all_1000 - ns/op 74863500 ns/op 71663719 ns/op 1.04
BenchmarkDocument/tree_delete_all_1000 - B/op 86990721 B/op 86990239 B/op 1.00
BenchmarkDocument/tree_delete_all_1000 - allocs/op 67754 allocs/op 67749 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_100 - ns/op 3725602 ns/op 3632525 ns/op 1.03
BenchmarkDocument/tree_edit_gc_100 - B/op 4121130 B/op 4121046 B/op 1.00
BenchmarkDocument/tree_edit_gc_100 - allocs/op 14359 allocs/op 14356 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - ns/op 302430902 ns/op 295614209 ns/op 1.02
BenchmarkDocument/tree_edit_gc_1000 - B/op 383466534 B/op 383467646 B/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 145412 allocs/op 145413 allocs/op 1.00
BenchmarkDocument/tree_split_gc_100 - ns/op 2484446 ns/op 2433512 ns/op 1.02
BenchmarkDocument/tree_split_gc_100 - B/op 2386950 B/op 2386869 B/op 1.00
BenchmarkDocument/tree_split_gc_100 - allocs/op 10344 allocs/op 10341 allocs/op 1.00
BenchmarkDocument/tree_split_gc_1000 - ns/op 185793404 ns/op 183611128 ns/op 1.01
BenchmarkDocument/tree_split_gc_1000 - B/op 221989152 B/op 221991942 B/op 1.00
BenchmarkDocument/tree_split_gc_1000 - allocs/op 112243 allocs/op 112259 allocs/op 1.00
BenchmarkRPC/client_to_server - ns/op 362391974 ns/op 355717978 ns/op 1.02
BenchmarkRPC/client_to_server - B/op 16399949 B/op 17228981 B/op 0.95
BenchmarkRPC/client_to_server - allocs/op 166829 allocs/op 166831 allocs/op 1.00
BenchmarkRPC/client_to_client_via_server - ns/op 611403976 ns/op 606482578 ns/op 1.01
BenchmarkRPC/client_to_client_via_server - B/op 37439572 B/op 32116544 B/op 1.17
BenchmarkRPC/client_to_client_via_server - allocs/op 312308 allocs/op 312901 allocs/op 1.00
BenchmarkRPC/attach_large_document - ns/op 1313540321 ns/op 1170164855 ns/op 1.12
BenchmarkRPC/attach_large_document - B/op 1878730760 B/op 1888403296 B/op 0.99
BenchmarkRPC/attach_large_document - allocs/op 7553 allocs/op 7527 allocs/op 1.00
BenchmarkRPC/adminCli_to_server - ns/op 542450470 ns/op 542495623 ns/op 1.00
BenchmarkRPC/adminCli_to_server - B/op 35987376 B/op 36802124 B/op 0.98
BenchmarkRPC/adminCli_to_server - allocs/op 289668 allocs/op 289677 allocs/op 1.00
BenchmarkLocker - ns/op 65.31 ns/op 65.96 ns/op 0.99
BenchmarkLocker - B/op 16 B/op 16 B/op 1
BenchmarkLocker - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkLockerParallel - ns/op 39.2 ns/op 38.94 ns/op 1.01
BenchmarkLockerParallel - B/op 0 B/op 0 B/op NaN
BenchmarkLockerParallel - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkLockerMoreKeys - ns/op 141 ns/op 141.9 ns/op 0.99
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 3755103 ns/op 3782260 ns/op 0.99
BenchmarkChange/Push_10_Changes - B/op 126162 B/op 125995 B/op 1.00
BenchmarkChange/Push_10_Changes - allocs/op 1254 allocs/op 1253 allocs/op 1.00
BenchmarkChange/Push_100_Changes - ns/op 14254059 ns/op 14268879 ns/op 1.00
BenchmarkChange/Push_100_Changes - B/op 650197 B/op 639349 B/op 1.02
BenchmarkChange/Push_100_Changes - allocs/op 6539 allocs/op 6540 allocs/op 1.00
BenchmarkChange/Push_1000_Changes - ns/op 114353390 ns/op 114005417 ns/op 1.00
BenchmarkChange/Push_1000_Changes - B/op 6116108 B/op 6146349 B/op 1.00
BenchmarkChange/Push_1000_Changes - allocs/op 62162 allocs/op 62158 allocs/op 1.00
BenchmarkChange/Pull_10_Changes - ns/op 2887176 ns/op 2883610 ns/op 1.00
BenchmarkChange/Pull_10_Changes - B/op 100057 B/op 100810 B/op 0.99
BenchmarkChange/Pull_10_Changes - allocs/op 952 allocs/op 952 allocs/op 1
BenchmarkChange/Pull_100_Changes - ns/op 4358394 ns/op 4323201 ns/op 1.01
BenchmarkChange/Pull_100_Changes - B/op 256176 B/op 258124 B/op 0.99
BenchmarkChange/Pull_100_Changes - allocs/op 3154 allocs/op 3153 allocs/op 1.00
BenchmarkChange/Pull_1000_Changes - ns/op 8499717 ns/op 8208312 ns/op 1.04
BenchmarkChange/Pull_1000_Changes - B/op 1395035 B/op 1395853 B/op 1.00
BenchmarkChange/Pull_1000_Changes - allocs/op 26864 allocs/op 26874 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - ns/op 16887616 ns/op 16781594 ns/op 1.01
BenchmarkSnapshot/Push_3KB_snapshot - B/op 800703 B/op 806918 B/op 0.99
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op 6545 allocs/op 6543 allocs/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - ns/op 117830642 ns/op 117538584 ns/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - B/op 6333359 B/op 6293910 B/op 1.01
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op 62169 allocs/op 62159 allocs/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op 6622660 ns/op 6555276 ns/op 1.01
BenchmarkSnapshot/Pull_3KB_snapshot - B/op 902743 B/op 905327 B/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op 14884 allocs/op 14879 allocs/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op 15051255 ns/op 14921599 ns/op 1.01
BenchmarkSnapshot/Pull_30KB_snapshot - B/op 6983106 B/op 6982547 B/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op 144147 allocs/op 144138 allocs/op 1.00
BenchmarkSync/memory_sync_10_test - ns/op 6839 ns/op 6869 ns/op 1.00
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 51900 ns/op 51839 ns/op 1.00
BenchmarkSync/memory_sync_100_test - B/op 8652 B/op 8646 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 590249 ns/op 597671 ns/op 0.99
BenchmarkSync/memory_sync_1000_test - B/op 74555 B/op 74301 B/op 1.00
BenchmarkSync/memory_sync_1000_test - allocs/op 2121 allocs/op 2106 allocs/op 1.01
BenchmarkSync/memory_sync_10000_test - ns/op 8182367 ns/op 7337210 ns/op 1.12
BenchmarkSync/memory_sync_10000_test - B/op 765105 B/op 759441 B/op 1.01
BenchmarkSync/memory_sync_10000_test - allocs/op 20581 allocs/op 20499 allocs/op 1.00
BenchmarkTextEditing - ns/op 19512992760 ns/op 18812245791 ns/op 1.04
BenchmarkTextEditing - B/op 9043314048 B/op 9038099880 B/op 1.00
BenchmarkTextEditing - allocs/op 19926612 allocs/op 19923868 allocs/op 1.00

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

Please sign in to comment.