Skip to content

Commit

Permalink
Refactor object test, Array and Object types
Browse files Browse the repository at this point in the history
  • Loading branch information
highcloud100 committed Jan 17, 2024
1 parent e6fc05d commit 896eaf1
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 130 deletions.
10 changes: 2 additions & 8 deletions pkg/document/crdt/array.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,11 @@ type Array struct {

// NewArray creates a new instance of Array.
func NewArray(elements *RGATreeList, createdAt *time.Ticket, value ...[]Element) *Array {
if len(value) > 1 {
panic("too many arguments in call to NewArray")
} else if len(value) == 1 {
if len(value) == 1 {
for _, v := range value[0] {
err := elements.InsertAfter(elements.LastCreatedAt(), v)
if err != nil {
panic(err)
}
_ = elements.InsertAfter(elements.LastCreatedAt(), v)
}
}

return &Array{
elements: elements,
createdAt: createdAt,
Expand Down
5 changes: 1 addition & 4 deletions pkg/document/crdt/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,11 @@ type Object struct {

// NewObject creates a new instance of Object.
func NewObject(memberNodes *ElementRHT, createdAt *time.Ticket, value ...map[string]Element) *Object {
if len(value) > 1 {
panic("too many arguments in call to NewObject")
} else if len(value) == 1 {
if len(value) == 1 {
for k, v := range value[0] {
memberNodes.Set(k, v)
}
}

return &Object{
memberNodes: memberNodes,
createdAt: createdAt,
Expand Down
164 changes: 46 additions & 118 deletions test/integration/object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func TestObject(t *testing.T) {
assert.Equal(t, `{"obj":{"arr":[1,"str"],"cnt":0,"obj":{"key3":42.200000},"str":"v","tree":{"type":"doc","children":[{"type":"p","children":[{"type":"text","value":"ab"}]}]},"txt":[]}}`, d1.Marshal())
assert.Equal(t, d2.Marshal(), d1.Marshal())

// 03. remove the shape object and check the number of tombstones.
// 03. remove the object and check the number of tombstones.
err = d1.Update(func(root *json.Object, p *presence.Presence) error {
root.Delete("obj")
return nil
Expand All @@ -228,187 +228,115 @@ func TestObject(t *testing.T) {
assert.Equal(t, 10, d2.GarbageCollect(time.MaxTicket))
})

t.Run("Set new object to json object literal sync test", func(t *testing.T) {

t.Run("object.set with json literal sync test", func(t *testing.T) {
ctx := context.Background()
d1 := document.New(helper.TestDocKey(t))
d2 := document.New(helper.TestDocKey(t))
err := c1.Attach(ctx, d1)
assert.NoError(t, err)
err = c2.Attach(ctx, d2)
assert.NoError(t, err)

err = d1.Update(func(root *json.Object, p *presence.Presence) error {
assert.NoError(t, c1.Attach(ctx, d1))
assert.NoError(t, c2.Attach(ctx, d2))

data := map[string]interface{}{
// 01. Sync set newObject from d1 to d2
err := d1.Update(func(root *json.Object, p *presence.Presence) error {
root.SetNewObject("shape", map[string]interface{}{
"color": "black",
}

root.SetNewObject("shape", data)
})
return nil
})

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

assert.Equal(t, `{"shape":{"color":"black"}}`, d1.Marshal())
assert.Equal(t, `{"shape":{"color":"black"}}`, d2.Marshal())
syncClientsThenAssertEqual(t, []clientAndDocPair{{c1, d1}, {c2, d2}})

// 02. Sync overwrite object from d2 to d1
err = d2.Update(func(root *json.Object, p *presence.Presence) error {
data := map[string]interface{}{
root.SetNewObject("shape", map[string]interface{}{
"color": "yellow",
}
root.SetNewObject("shape", data)
})
return nil
})

err = c2.Sync(ctx)
assert.NoError(t, err)
err = c1.Sync(ctx)
assert.NoError(t, err)
syncClientsThenAssertEqual(t, []clientAndDocPair{{c1, d1}, {c2, d2}})

assert.Equal(t, `{"shape":{"color":"yellow"}}`, d1.Marshal())
assert.Equal(t, `{"shape":{"color":"yellow"}}`, d2.Marshal())

// 03. Sync delete object from d2 to d1
err = d2.Update(func(root *json.Object, p *presence.Presence) error {
root.GetObject("shape").Delete("color")
return nil
})

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

assert.Equal(t, 1, d1.GarbageLen())
assert.Equal(t, 1, d1.GarbageCollect(time.MaxTicket))

})

t.Run("Set new object to json object literal set/delete test", func(t *testing.T) {
ctx := context.Background()
d1 := document.New(helper.TestDocKey(t))
err := c1.Attach(ctx, d1)
assert.NoError(t, err)

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

err = d1.Update(func(root *json.Object, p *presence.Presence) error {
json := map[string]interface{}{
"key1": "value1",
"key2": "value2",
"key3": "value3",
}
root.SetNewObject("obj", json)
root.SetNewObject("obj2", json)
return nil
})

assert.NoError(t, err)
syncClientsThenAssertEqual(t, []clientAndDocPair{{c1, d1}, {c2, d2}})

err = d1.Update(func(root *json.Object, p *presence.Presence) error {
root.Delete("obj")
root.GetObject("obj2").Delete("key1")
return nil
})
assert.NoError(t, err)
syncClientsThenAssertEqual(t, []clientAndDocPair{{c1, d1}, {c2, d2}})
})

t.Run("Json object literal array type test", func(t *testing.T) {
t.Run("object.set with json literal array type test", func(t *testing.T) {
ctx := context.Background()
d1 := document.New(helper.TestDocKey(t))
err := c1.Attach(ctx, d1)
assert.NoError(t, err)

array2 := []interface{}{7, 8}
assert.NoError(t, c1.Attach(ctx, d1))

err = d1.Update(func(root *json.Object, p *presence.Presence) error {
json := map[string]interface{}{
"array": []interface{}{1, 2, 3, array2},
}
root.SetNewObject("obj", json)
err := d1.Update(func(root *json.Object, p *presence.Presence) error {
root.SetNewObject("obj", map[string]interface{}{
"array": []interface{}{1, 2, 3, []interface{}{7, 8}},
})
assert.Equal(t, `{"obj":{"array":[1,2,3,[7,8]]}}`, root.Marshal())

root.GetObject("obj").GetArray("array").Delete(3)
assert.Equal(t, `{"obj":{"array":[1,2,3]}}`, root.Marshal())
return nil
})

assert.NoError(t, err)

assert.Equal(t, 3, d1.GarbageLen())
assert.Equal(t, 3, d1.GarbageCollect(time.MaxTicket))

})

t.Run("Json object literal counter type test", func(t *testing.T) {
t.Run("object.set with json literal counter type test", func(t *testing.T) {
ctx := context.Background()
d1 := document.New(helper.TestDocKey(t))
err := c1.Attach(ctx, d1)
assert.NoError(t, err)
assert.NoError(t, c1.Attach(ctx, d1))

err = d1.Update(func(root *json.Object, p *presence.Presence) error {
json := map[string]interface{}{
"counterLong": json.NewCounter(0, crdt.LongCnt),
"counterInt": json.NewCounter(0, crdt.IntegerCnt),
}
root.SetNewObject("obj", json)

root.GetObject("obj").GetCounter("counterLong").Increase(3)
root.GetObject("obj").GetCounter("counterInt").Increase(-2)
err := d1.Update(func(root *json.Object, p *presence.Presence) error {
root.SetNewObject("obj", map[string]interface{}{
"cntLong": json.NewCounter(0, crdt.LongCnt),
"cntInt": json.NewCounter(0, crdt.IntegerCnt),
})

root.GetObject("obj").GetCounter("cntLong").Increase(1)
root.GetObject("obj").GetCounter("cntInt").Increase(-1)
return nil
})

assert.NoError(t, err)
assert.Equal(t, `{"obj":{"counterInt":-2,"counterLong":3}}`, d1.Marshal())
assert.Equal(t, `{"obj":{"cntInt":-1,"cntLong":1}}`, d1.Marshal())
})

t.Run("Json object literal text type test", func(t *testing.T) {
t.Run("object.set with json literal text type test", func(t *testing.T) {
ctx := context.Background()
d1 := document.New(helper.TestDocKey(t))
err := c1.Attach(ctx, d1)
assert.NoError(t, err)
assert.NoError(t, c1.Attach(ctx, d1))

err = d1.Update(func(root *json.Object, p *presence.Presence) error {
json := map[string]interface{}{
"text": json.NewText(),
}
root.SetNewObject("obj", json)
root.GetObject("obj").GetText("text").Edit(0, 0, "ABCD")
err := d1.Update(func(root *json.Object, p *presence.Presence) error {
root.SetNewObject("obj", map[string]interface{}{
"txt": json.NewText(),
})
root.GetObject("obj").GetText("txt").Edit(0, 0, "ABCD")
return nil
})

assert.NoError(t, err)
assert.Equal(t, `{"obj":{"text":[{"val":"ABCD"}]}}`, d1.Marshal())
assert.Equal(t, `{"obj":{"txt":[{"val":"ABCD"}]}}`, d1.Marshal())
})

t.Run("Json object literal primitive type test", func(t *testing.T) {
t.Run("object.set with json literal primitive type test", func(t *testing.T) {
ctx := context.Background()
d1 := document.New(helper.TestDocKey(t))
err := c1.Attach(ctx, d1)
assert.NoError(t, err)

var testInt int32 = 32
assert.NoError(t, c1.Attach(ctx, d1))

err = d1.Update(func(root *json.Object, p *presence.Presence) error {
json := map[string]interface{}{
err := d1.Update(func(root *json.Object, p *presence.Presence) error {
root.SetNewObject("obj", map[string]interface{}{
"nill": nil,
"bool": true,
"long": 9223372036854775807,
"int": testInt,
"int": 32,
"double": 1.79,
"bytes": []byte{65, 66},
"date": gotime.Date(2022, 3, 2, 9, 10, 0, 0, gotime.UTC),
}
root.SetNewObject("obj", json)
})
return nil
})

assert.NoError(t, err)
assert.Equal(t, `{"obj":{"bool":true,"bytes":"AB","date":"2022-03-02T09:10:00Z","double":1.790000,"int":32,"long":9223372036854775807,"nill":null}}`, d1.Marshal())
})
Expand Down

1 comment on commit 896eaf1

@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: 896eaf1 Previous: a8c58f9 Ratio
BenchmarkDocument/constructor_test - ns/op 1453 ns/op 1457 ns/op 1.00
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 - ns/op 842.8 ns/op 849.5 ns/op 0.99
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 - ns/op 7407 ns/op 7524 ns/op 0.98
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 - ns/op 19266 ns/op 18601 ns/op 1.04
BenchmarkDocument/nested_update_test - B/op 12059 B/op 12059 B/op 1
BenchmarkDocument/nested_update_test - allocs/op 260 allocs/op 260 allocs/op 1
BenchmarkDocument/delete_test - ns/op 22429 ns/op 22335 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 - ns/op 8549 ns/op 8516 ns/op 1.00
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 - ns/op 28944 ns/op 28781 ns/op 1.01
BenchmarkDocument/array_test - B/op 11883 B/op 11883 B/op 1
BenchmarkDocument/array_test - allocs/op 274 allocs/op 274 allocs/op 1
BenchmarkDocument/text_test - ns/op 30783 ns/op 30487 ns/op 1.01
BenchmarkDocument/text_test - B/op 14915 B/op 14828 B/op 1.01
BenchmarkDocument/text_test - allocs/op 470 allocs/op 470 allocs/op 1
BenchmarkDocument/text_composition_test - ns/op 29243 ns/op 28865 ns/op 1.01
BenchmarkDocument/text_composition_test - B/op 18431 B/op 18310 B/op 1.01
BenchmarkDocument/text_composition_test - allocs/op 479 allocs/op 479 allocs/op 1
BenchmarkDocument/rich_text_test - ns/op 79957 ns/op 80677 ns/op 0.99
BenchmarkDocument/rich_text_test - B/op 38677 B/op 38572 B/op 1.00
BenchmarkDocument/rich_text_test - allocs/op 1149 allocs/op 1149 allocs/op 1
BenchmarkDocument/counter_test - ns/op 17010 ns/op 16759 ns/op 1.01
BenchmarkDocument/counter_test - B/op 10466 B/op 10242 B/op 1.02
BenchmarkDocument/counter_test - allocs/op 238 allocs/op 238 allocs/op 1
BenchmarkDocument/text_edit_gc_100 - ns/op 2901018 ns/op 2887897 ns/op 1.00
BenchmarkDocument/text_edit_gc_100 - B/op 1658436 B/op 1655169 B/op 1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op 17094 allocs/op 17094 allocs/op 1
BenchmarkDocument/text_edit_gc_1000 - ns/op 230686814 ns/op 229415441 ns/op 1.01
BenchmarkDocument/text_edit_gc_1000 - B/op 144392563 B/op 144344868 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 200989 allocs/op 200908 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 - ns/op 3431855 ns/op 3374708 ns/op 1.02
BenchmarkDocument/text_split_gc_100 - B/op 2316836 B/op 2313351 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 16197 allocs/op 16195 allocs/op 1.00
BenchmarkDocument/text_split_gc_1000 - ns/op 291439030 ns/op 287430465 ns/op 1.01
BenchmarkDocument/text_split_gc_1000 - B/op 228924204 B/op 228891160 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 203989 allocs/op 203934 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 - ns/op 11805339 ns/op 10779697 ns/op 1.10
BenchmarkDocument/text_delete_all_10000 - B/op 5810789 B/op 5809238 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 40675 allocs/op 40669 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 - ns/op 200641429 ns/op 188925896 ns/op 1.06
BenchmarkDocument/text_delete_all_100000 - B/op 81886368 B/op 81910706 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 411551 allocs/op 411662 allocs/op 1.00
BenchmarkDocument/text_100 - ns/op 233909 ns/op 229354 ns/op 1.02
BenchmarkDocument/text_100 - B/op 120139 B/op 118514 B/op 1.01
BenchmarkDocument/text_100 - allocs/op 5082 allocs/op 5082 allocs/op 1
BenchmarkDocument/text_1000 - ns/op 2518416 ns/op 2502759 ns/op 1.01
BenchmarkDocument/text_1000 - B/op 1169128 B/op 1153102 B/op 1.01
BenchmarkDocument/text_1000 - allocs/op 50086 allocs/op 50086 allocs/op 1
BenchmarkDocument/array_1000 - ns/op 1297324 ns/op 1262770 ns/op 1.03
BenchmarkDocument/array_1000 - B/op 1091319 B/op 1091147 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11829 allocs/op 11829 allocs/op 1
BenchmarkDocument/array_10000 - ns/op 13619832 ns/op 13221008 ns/op 1.03
BenchmarkDocument/array_10000 - B/op 9800029 B/op 9799195 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120294 allocs/op 120291 allocs/op 1.00
BenchmarkDocument/array_gc_100 - ns/op 157807 ns/op 172372 ns/op 0.92
BenchmarkDocument/array_gc_100 - B/op 132655 B/op 139899 B/op 0.95
BenchmarkDocument/array_gc_100 - allocs/op 1258 allocs/op 1472 allocs/op 0.85
BenchmarkDocument/array_gc_1000 - ns/op 1482126 ns/op 1651513 ns/op 0.90
BenchmarkDocument/array_gc_1000 - B/op 1159005 B/op 1241466 B/op 0.93
BenchmarkDocument/array_gc_1000 - allocs/op 12874 allocs/op 14897 allocs/op 0.86
BenchmarkDocument/counter_1000 - ns/op 219800 ns/op 210894 ns/op 1.04
BenchmarkDocument/counter_1000 - B/op 192916 B/op 192884 B/op 1.00
BenchmarkDocument/counter_1000 - allocs/op 5767 allocs/op 5767 allocs/op 1
BenchmarkDocument/counter_10000 - ns/op 2286859 ns/op 2217464 ns/op 1.03
BenchmarkDocument/counter_10000 - B/op 2087832 B/op 2087814 B/op 1.00
BenchmarkDocument/counter_10000 - allocs/op 59774 allocs/op 59774 allocs/op 1
BenchmarkDocument/object_1000 - ns/op 1452387 ns/op 1442631 ns/op 1.01
BenchmarkDocument/object_1000 - B/op 1427860 B/op 1428083 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9846 allocs/op 9847 allocs/op 1.00
BenchmarkDocument/object_10000 - ns/op 15420192 ns/op 15149865 ns/op 1.02
BenchmarkDocument/object_10000 - B/op 12167262 B/op 12166338 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 100565 allocs/op 100562 allocs/op 1.00
BenchmarkDocument/tree_100 - ns/op 1070654 ns/op 1068412 ns/op 1.00
BenchmarkDocument/tree_100 - B/op 943781 B/op 943709 B/op 1.00
BenchmarkDocument/tree_100 - allocs/op 6102 allocs/op 6101 allocs/op 1.00
BenchmarkDocument/tree_1000 - ns/op 78255567 ns/op 79029252 ns/op 0.99
BenchmarkDocument/tree_1000 - B/op 86460594 B/op 86460602 B/op 1.00
BenchmarkDocument/tree_1000 - allocs/op 60116 allocs/op 60116 allocs/op 1
BenchmarkDocument/tree_10000 - ns/op 9694236911 ns/op 9661149264 ns/op 1.00
BenchmarkDocument/tree_10000 - B/op 8580984416 B/op 8580973784 B/op 1.00
BenchmarkDocument/tree_10000 - allocs/op 600249 allocs/op 600230 allocs/op 1.00
BenchmarkDocument/tree_delete_all_1000 - ns/op 79155141 ns/op 79816852 ns/op 0.99
BenchmarkDocument/tree_delete_all_1000 - B/op 86990546 B/op 86990889 B/op 1.00
BenchmarkDocument/tree_delete_all_1000 - allocs/op 67755 allocs/op 67750 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_100 - ns/op 3864173 ns/op 3866691 ns/op 1.00
BenchmarkDocument/tree_edit_gc_100 - B/op 4121051 B/op 4121023 B/op 1.00
BenchmarkDocument/tree_edit_gc_100 - allocs/op 14359 allocs/op 14358 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - ns/op 318901189 ns/op 326051394 ns/op 0.98
BenchmarkDocument/tree_edit_gc_1000 - B/op 383466294 B/op 383466086 B/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 145410 allocs/op 145407 allocs/op 1.00
BenchmarkDocument/tree_split_gc_100 - ns/op 2615607 ns/op 2611696 ns/op 1.00
BenchmarkDocument/tree_split_gc_100 - B/op 2386963 B/op 2386898 B/op 1.00
BenchmarkDocument/tree_split_gc_100 - allocs/op 10344 allocs/op 10343 allocs/op 1.00
BenchmarkDocument/tree_split_gc_1000 - ns/op 196597658 ns/op 196739556 ns/op 1.00
BenchmarkDocument/tree_split_gc_1000 - B/op 221990764 B/op 221991590 B/op 1.00
BenchmarkDocument/tree_split_gc_1000 - allocs/op 112259 allocs/op 112260 allocs/op 1.00
BenchmarkRPC/client_to_server - ns/op 361365780 ns/op 356144469 ns/op 1.01
BenchmarkRPC/client_to_server - B/op 17801789 B/op 17801216 B/op 1.00
BenchmarkRPC/client_to_server - allocs/op 166913 allocs/op 166911 allocs/op 1.00
BenchmarkRPC/client_to_client_via_server - ns/op 614293610 ns/op 613079232 ns/op 1.00
BenchmarkRPC/client_to_client_via_server - B/op 33814388 B/op 31722656 B/op 1.07
BenchmarkRPC/client_to_client_via_server - allocs/op 312959 allocs/op 313048 allocs/op 1.00
BenchmarkRPC/attach_large_document - ns/op 1252603925 ns/op 1479934941 ns/op 0.85
BenchmarkRPC/attach_large_document - B/op 1889206800 B/op 1890029520 B/op 1.00
BenchmarkRPC/attach_large_document - allocs/op 7528 allocs/op 7567 allocs/op 0.99
BenchmarkRPC/adminCli_to_server - ns/op 541626243 ns/op 537051132 ns/op 1.01
BenchmarkRPC/adminCli_to_server - B/op 36800292 B/op 36806452 B/op 1.00
BenchmarkRPC/adminCli_to_server - allocs/op 289716 allocs/op 289659 allocs/op 1.00
BenchmarkLocker - ns/op 64.46 ns/op 65.34 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 38.48 ns/op 38.48 ns/op 1
BenchmarkLockerParallel - B/op 0 B/op 0 B/op NaN
BenchmarkLockerParallel - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkLockerMoreKeys - ns/op 150.1 ns/op 145.1 ns/op 1.03
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 3786929 ns/op 3768343 ns/op 1.00
BenchmarkChange/Push_10_Changes - B/op 126306 B/op 126223 B/op 1.00
BenchmarkChange/Push_10_Changes - allocs/op 1254 allocs/op 1254 allocs/op 1
BenchmarkChange/Push_100_Changes - ns/op 13947061 ns/op 14005221 ns/op 1.00
BenchmarkChange/Push_100_Changes - B/op 650105 B/op 648654 B/op 1.00
BenchmarkChange/Push_100_Changes - allocs/op 6538 allocs/op 6539 allocs/op 1.00
BenchmarkChange/Push_1000_Changes - ns/op 112148048 ns/op 114047673 ns/op 0.98
BenchmarkChange/Push_1000_Changes - B/op 6134158 B/op 6036337 B/op 1.02
BenchmarkChange/Push_1000_Changes - allocs/op 62159 allocs/op 62157 allocs/op 1.00
BenchmarkChange/Pull_10_Changes - ns/op 2853706 ns/op 2839363 ns/op 1.01
BenchmarkChange/Pull_10_Changes - B/op 100552 B/op 100881 B/op 1.00
BenchmarkChange/Pull_10_Changes - allocs/op 952 allocs/op 952 allocs/op 1
BenchmarkChange/Pull_100_Changes - ns/op 4317956 ns/op 4308547 ns/op 1.00
BenchmarkChange/Pull_100_Changes - B/op 257665 B/op 258255 B/op 1.00
BenchmarkChange/Pull_100_Changes - allocs/op 3154 allocs/op 3154 allocs/op 1
BenchmarkChange/Pull_1000_Changes - ns/op 8255314 ns/op 8372656 ns/op 0.99
BenchmarkChange/Pull_1000_Changes - B/op 1395071 B/op 1396187 B/op 1.00
BenchmarkChange/Pull_1000_Changes - allocs/op 26874 allocs/op 26871 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - ns/op 16457636 ns/op 16777319 ns/op 0.98
BenchmarkSnapshot/Push_3KB_snapshot - B/op 802938 B/op 809995 B/op 0.99
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op 6543 allocs/op 6542 allocs/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - ns/op 115603240 ns/op 117069671 ns/op 0.99
BenchmarkSnapshot/Push_30KB_snapshot - B/op 6233959 B/op 6250016 B/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op 62166 allocs/op 62161 allocs/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op 6528274 ns/op 6563310 ns/op 0.99
BenchmarkSnapshot/Pull_3KB_snapshot - B/op 905963 B/op 905174 B/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op 14886 allocs/op 14882 allocs/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op 14787211 ns/op 15000336 ns/op 0.99
BenchmarkSnapshot/Pull_30KB_snapshot - B/op 6979692 B/op 6977754 B/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op 144144 allocs/op 144148 allocs/op 1.00
BenchmarkSync/memory_sync_10_test - ns/op 7061 ns/op 6824 ns/op 1.03
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 50971 ns/op 51635 ns/op 0.99
BenchmarkSync/memory_sync_100_test - B/op 8669 B/op 8659 B/op 1.00
BenchmarkSync/memory_sync_100_test - allocs/op 275 allocs/op 274 allocs/op 1.00
BenchmarkSync/memory_sync_1000_test - ns/op 600192 ns/op 582724 ns/op 1.03
BenchmarkSync/memory_sync_1000_test - B/op 74238 B/op 74925 B/op 0.99
BenchmarkSync/memory_sync_1000_test - allocs/op 2105 allocs/op 2141 allocs/op 0.98
BenchmarkSync/memory_sync_10000_test - ns/op 7402594 ns/op 7320373 ns/op 1.01
BenchmarkSync/memory_sync_10000_test - B/op 750543 B/op 761425 B/op 0.99
BenchmarkSync/memory_sync_10000_test - allocs/op 20391 allocs/op 20593 allocs/op 0.99
BenchmarkTextEditing - ns/op 18915255758 ns/op 18585017456 ns/op 1.02
BenchmarkTextEditing - B/op 9041907712 B/op 9037385240 B/op 1.00
BenchmarkTextEditing - allocs/op 19922847 allocs/op 19920435 allocs/op 1.00

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

Please sign in to comment.