Skip to content

Commit

Permalink
Fix test code to test table style
Browse files Browse the repository at this point in the history
  • Loading branch information
justiceHui committed Jan 8, 2024
1 parent 62ed6c5 commit 3d22070
Showing 1 changed file with 152 additions and 115 deletions.
267 changes: 152 additions & 115 deletions pkg/document/crdt/rht_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,53 +11,69 @@ import (

func TestRHT(t *testing.T) {
t.Run("marshal test", func(t *testing.T) {
key1 := `hello\\\t`
value1 := "world\"\f\b"
key2 := "hi"
value2 := `test\r`
expected1 := `{}`
expected2 := `{"hello\\\\\\t":"world\"\f\b"}`
expected3 := `{"hello\\\\\\t":"world\"\f\b","hi":"test\\r"}`

// 1. empty hash table
rht := crdt.NewRHT()
actual1 := rht.Marshal()
assert.Equal(t, expected1, actual1)
jsonTests := []struct {
insertKey string
insertVal string
expectStr string
}{
{ // 1. empty hash table
insertKey: ``,
insertVal: ``,
expectStr: `{}`,
},
{ // 2. only one element
insertKey: "hello\\\\\\t",
insertVal: "world\"\f\b",
expectStr: `{"hello\\\\\\t":"world\"\f\b"}`,
},
{ // 3. non-empty hash table
insertKey: "hi",
insertVal: `test\r`,
expectStr: `{"hello\\\\\\t":"world\"\f\b","hi":"test\\r"}`,
},
}

// 2. only one element
rht.Set(key1, value1, nil)
actual2 := rht.Marshal()
assert.Equal(t, expected2, actual2)
rht := crdt.NewRHT()

// 3. non-empty hash table
rht.Set(key2, value2, nil)
actual3 := rht.Marshal()
assert.Equal(t, expected3, actual3)
for _, tt := range jsonTests {
if len(tt.insertKey) > 0 {
rht.Set(tt.insertKey, tt.insertVal, nil)
}
assert.Equal(t, tt.expectStr, rht.Marshal())
}
})

t.Run("xml test", func(t *testing.T) {
key1 := `hello\\\t`
value1 := "world\"\f\b"
key2 := "hi"
value2 := `test\r`
expected1 := ``
expected2 := `hello\\\t="world\"\f\b"`
expected3 := `hello\\\t="world\"\f\b" hi="test\\r"`

// 1. empty hash table
rht := crdt.NewRHT()
actual1 := rht.ToXML()
assert.Equal(t, expected1, actual1)
xmlTests := []struct {
insertKey string
insertVal string
expectStr string
}{
{ // 1. empty hash table
insertKey: ``,
insertVal: ``,
expectStr: ``,
},
{ // 2. only one element
insertKey: "hello\\\\\\t",
insertVal: "world\"\f\b",
expectStr: `hello\\\t="world\"\f\b"`,
},
{ // 3. non-empty hash table
insertKey: "hi",
insertVal: `test\r`,
expectStr: `hello\\\t="world\"\f\b" hi="test\\r"`,
},
}

// 2. only one element
rht.Set(key1, value1, nil)
actual2 := rht.ToXML()
assert.Equal(t, expected2, actual2)
rht := crdt.NewRHT()

// 3. non-empty hash table
rht.Set(key2, value2, nil)
actual3 := rht.ToXML()
assert.Equal(t, expected3, actual3)
for _, tt := range xmlTests {
if len(tt.insertKey) > 0 {
rht.Set(tt.insertKey, tt.insertVal, nil)
}
assert.Equal(t, tt.expectStr, rht.ToXML())
}
})

t.Run("change value test", func(t *testing.T) {
Expand Down Expand Up @@ -88,85 +104,106 @@ func TestRHT(t *testing.T) {
})

t.Run("remove test", func(t *testing.T) {
root := helper.TestRoot()
ctx := helper.TextChangeContext(root)

rht := crdt.NewRHT()
key1 := `key1`
value1 := `value1`
val1 := `value1`
val11 := `value11`

key2 := `key2`
value2 := `value2`
val2 := `value2`
val22 := `value22`

removeTests := []struct {
insertKey []string
insertVal []string
deleteKey []string
deleteVal []string
expectXML string
expectJSON string
expectSize int
}{
{ // 1. set elements
insertKey: []string{key1, key2},
insertVal: []string{val1, val2},
deleteKey: []string{},
deleteVal: []string{},
expectXML: `key1="value1" key2="value2"`,
expectJSON: `{"key1":"value1","key2":"value2"}`,
expectSize: 2,
},
{ // 2. remove element
insertKey: []string{},
insertVal: []string{},
deleteKey: []string{key1},
deleteVal: []string{val1},
expectXML: `key2="value2"`,
expectJSON: `{"key2":"value2"}`,
expectSize: 1,
},
{ // 3. set after remove
insertKey: []string{key1},
insertVal: []string{val11},
deleteKey: []string{},
deleteVal: []string{},
expectXML: `key1="value11" key2="value2"`,
expectJSON: `{"key1":"value11","key2":"value2"}`,
expectSize: 2,
},
{ // 4. remove element
insertKey: []string{key2},
insertVal: []string{val22},
deleteKey: []string{key1},
deleteVal: []string{val11},
expectXML: `key2="value22"`,
expectJSON: `{"key2":"value22"}`,
expectSize: 1,
},
{ // 5. remove element again
insertKey: []string{},
insertVal: []string{},
deleteKey: []string{key1},
deleteVal: []string{``},
expectXML: `key2="value22"`,
expectJSON: `{"key2":"value22"}`,
expectSize: 1,
},
{ // 6. remove element -> clear
insertKey: []string{},
insertVal: []string{},
deleteKey: []string{key2},
deleteVal: []string{val22},
expectXML: ``,
expectJSON: `{}`,
expectSize: 0,
},
{ // 7. remove not exist key
insertKey: []string{},
insertVal: []string{},
deleteKey: []string{`not-exist-key`},
deleteVal: []string{``},
expectXML: ``,
expectJSON: `{}`,
expectSize: 0,
},
}

value11 := `value11`
value22 := `value22`
root := helper.TestRoot()
ctx := helper.TextChangeContext(root)

// 1. set elements
rht.Set(key1, value1, ctx.IssueTimeTicket())
rht.Set(key2, value2, ctx.IssueTimeTicket())
expected1 := `{"key1":"value1","key2":"value2"}`
actual1 := rht.Marshal()
assert.Equal(t, expected1, actual1)
assert.Equal(t, 2, rht.Len())
assert.Equal(t, 2, len(rht.Nodes()))
assert.Equal(t, 2, len(rht.Elements()))
rht := crdt.NewRHT()

// 2. remove element
rht.Remove(key1, ctx.IssueTimeTicket())
expected2 := `{"key2":"value2"}`
actual2 := rht.Marshal()
assert.Equal(t, expected2, actual2)
assert.Equal(t, 1, rht.Len())
assert.Equal(t, 1, len(rht.Nodes()))
assert.Equal(t, 1, len(rht.Elements()))

// 3. set after remove
rht.Set(key1, value11, ctx.IssueTimeTicket())
expected3 := `{"key1":"value11","key2":"value2"}`
actual3 := rht.Marshal()
assert.Equal(t, expected3, actual3)
assert.Equal(t, 2, rht.Len())
assert.Equal(t, 2, len(rht.Nodes()))
assert.Equal(t, 2, len(rht.Elements()))
assert.Equal(t, `key1="value11" key2="value2"`, rht.ToXML())

// 4. remove element
rht.Remove(key1, ctx.IssueTimeTicket())
rht.Set(key2, value22, ctx.IssueTimeTicket())
expected4 := `{"key2":"value22"}`
actual4 := rht.Marshal()
assert.Equal(t, expected4, actual4)
assert.Equal(t, 1, rht.Len())
assert.Equal(t, 1, len(rht.Nodes()))
assert.Equal(t, 1, len(rht.Elements()))

// 5. remove element again
assert.Equal(t, ``, rht.Remove(key1, ctx.IssueTimeTicket()))
expected5 := `{"key2":"value22"}`
actual5 := rht.Marshal()
assert.Equal(t, expected5, actual5)
assert.Equal(t, 1, rht.Len())
assert.Equal(t, 1, len(rht.Nodes()))
assert.Equal(t, 1, len(rht.Elements()))
assert.Equal(t, `key2="value22"`, rht.ToXML())

// 6. remove element -> clear
rht.Remove(key2, ctx.IssueTimeTicket())
expected6 := `{}`
actual6 := rht.Marshal()
assert.Equal(t, expected6, actual6)
assert.Equal(t, 0, rht.Len())
assert.Equal(t, 0, len(rht.Nodes()))
assert.Equal(t, 0, len(rht.Elements()))
assert.Equal(t, ``, rht.ToXML())

// 7. remove not exist key
assert.Equal(t, ``, rht.Remove(`key3`, ctx.IssueTimeTicket()))
expected7 := `{}`
actual7 := rht.Marshal()
assert.Equal(t, expected7, actual7)
assert.Equal(t, 0, rht.Len())
assert.Equal(t, ``, rht.ToXML())
assert.Equal(t, 0, len(rht.Nodes()))
assert.Equal(t, 0, len(rht.Elements()))
for _, tt := range removeTests {
for i, key := range tt.insertKey {
rht.Set(key, tt.insertVal[i], ctx.IssueTimeTicket())
}
for i, key := range tt.deleteKey {
removedElement := rht.Remove(key, ctx.IssueTimeTicket())
assert.Equal(t, tt.deleteVal[i], removedElement)
}
assert.Equal(t, tt.expectXML, rht.ToXML())
assert.Equal(t, tt.expectJSON, rht.Marshal())
assert.Equal(t, tt.expectSize, rht.Len())
assert.Equal(t, tt.expectSize, len(rht.Nodes()))
assert.Equal(t, tt.expectSize, len(rht.Elements()))
}
})
}

1 comment on commit 3d22070

@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: 3d22070 Previous: 50b3c50 Ratio
BenchmarkDocument/constructor_test - ns/op 1383 ns/op 1542 ns/op 0.90
BenchmarkDocument/constructor_test - B/op 1208 B/op 1208 B/op 1
BenchmarkDocument/constructor_test - allocs/op 20 allocs/op 20 allocs/op 1
BenchmarkDocument/status_test - ns/op 780.7 ns/op 780 ns/op 1.00
BenchmarkDocument/status_test - B/op 1176 B/op 1176 B/op 1
BenchmarkDocument/status_test - allocs/op 18 allocs/op 18 allocs/op 1
BenchmarkDocument/equals_test - ns/op 7137 ns/op 7138 ns/op 1.00
BenchmarkDocument/equals_test - B/op 6913 B/op 6913 B/op 1
BenchmarkDocument/equals_test - allocs/op 120 allocs/op 120 allocs/op 1
BenchmarkDocument/nested_update_test - ns/op 16159 ns/op 16248 ns/op 0.99
BenchmarkDocument/nested_update_test - B/op 11963 B/op 11963 B/op 1
BenchmarkDocument/nested_update_test - allocs/op 254 allocs/op 254 allocs/op 1
BenchmarkDocument/delete_test - ns/op 21909 ns/op 22078 ns/op 0.99
BenchmarkDocument/delete_test - B/op 15188 B/op 15188 B/op 1
BenchmarkDocument/delete_test - allocs/op 333 allocs/op 333 allocs/op 1
BenchmarkDocument/object_test - ns/op 8311 ns/op 8387 ns/op 0.99
BenchmarkDocument/object_test - B/op 6721 B/op 6721 B/op 1
BenchmarkDocument/object_test - allocs/op 116 allocs/op 116 allocs/op 1
BenchmarkDocument/array_test - ns/op 28689 ns/op 28691 ns/op 1.00
BenchmarkDocument/array_test - B/op 11819 B/op 11819 B/op 1
BenchmarkDocument/array_test - allocs/op 270 allocs/op 270 allocs/op 1
BenchmarkDocument/text_test - ns/op 34633 ns/op 31234 ns/op 1.11
BenchmarkDocument/text_test - B/op 15412 B/op 15412 B/op 1
BenchmarkDocument/text_test - allocs/op 479 allocs/op 479 allocs/op 1
BenchmarkDocument/text_composition_test - ns/op 28792 ns/op 28838 ns/op 1.00
BenchmarkDocument/text_composition_test - B/op 18591 B/op 18590 B/op 1.00
BenchmarkDocument/text_composition_test - allocs/op 481 allocs/op 481 allocs/op 1
BenchmarkDocument/rich_text_test - ns/op 85223 ns/op 84725 ns/op 1.01
BenchmarkDocument/rich_text_test - B/op 47959 B/op 47959 B/op 1
BenchmarkDocument/rich_text_test - allocs/op 1216 allocs/op 1216 allocs/op 1
BenchmarkDocument/counter_test - ns/op 16549 ns/op 16633 ns/op 0.99
BenchmarkDocument/counter_test - B/op 10210 B/op 10210 B/op 1
BenchmarkDocument/counter_test - allocs/op 236 allocs/op 236 allocs/op 1
BenchmarkDocument/text_edit_gc_100 - ns/op 2925357 ns/op 2896824 ns/op 1.01
BenchmarkDocument/text_edit_gc_100 - B/op 1658499 B/op 1658595 B/op 1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op 17092 allocs/op 17092 allocs/op 1
BenchmarkDocument/text_edit_gc_1000 - ns/op 233164507 ns/op 232593749 ns/op 1.00
BenchmarkDocument/text_edit_gc_1000 - B/op 144383241 B/op 144379059 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 200940 allocs/op 200906 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 - ns/op 3398914 ns/op 3420377 ns/op 0.99
BenchmarkDocument/text_split_gc_100 - B/op 2316955 B/op 2316994 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 16196 allocs/op 16196 allocs/op 1
BenchmarkDocument/text_split_gc_1000 - ns/op 291166959 ns/op 291333302 ns/op 1.00
BenchmarkDocument/text_split_gc_1000 - B/op 228935988 B/op 228919328 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 204000 allocs/op 203934 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 - ns/op 11833494 ns/op 11818492 ns/op 1.00
BenchmarkDocument/text_delete_all_10000 - B/op 5810513 B/op 5810678 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 40676 allocs/op 40675 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 - ns/op 199128908 ns/op 201368223 ns/op 0.99
BenchmarkDocument/text_delete_all_100000 - B/op 81895589 B/op 81900570 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 411608 allocs/op 411626 allocs/op 1.00
BenchmarkDocument/text_100 - ns/op 219683 ns/op 220270 ns/op 1.00
BenchmarkDocument/text_100 - B/op 120107 B/op 120107 B/op 1
BenchmarkDocument/text_100 - allocs/op 5080 allocs/op 5080 allocs/op 1
BenchmarkDocument/text_1000 - ns/op 2386454 ns/op 2429840 ns/op 0.98
BenchmarkDocument/text_1000 - B/op 1169095 B/op 1169078 B/op 1.00
BenchmarkDocument/text_1000 - allocs/op 50084 allocs/op 50084 allocs/op 1
BenchmarkDocument/array_1000 - ns/op 1195694 ns/op 1191138 ns/op 1.00
BenchmarkDocument/array_1000 - B/op 1091224 B/op 1091341 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11825 allocs/op 11826 allocs/op 1.00
BenchmarkDocument/array_10000 - ns/op 13115881 ns/op 13214012 ns/op 0.99
BenchmarkDocument/array_10000 - B/op 9800400 B/op 9800667 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120292 allocs/op 120294 allocs/op 1.00
BenchmarkDocument/array_gc_100 - ns/op 145990 ns/op 144166 ns/op 1.01
BenchmarkDocument/array_gc_100 - B/op 132493 B/op 132489 B/op 1.00
BenchmarkDocument/array_gc_100 - allocs/op 1248 allocs/op 1248 allocs/op 1
BenchmarkDocument/array_gc_1000 - ns/op 1391613 ns/op 1375392 ns/op 1.01
BenchmarkDocument/array_gc_1000 - B/op 1158894 B/op 1158914 B/op 1.00
BenchmarkDocument/array_gc_1000 - allocs/op 12864 allocs/op 12864 allocs/op 1
BenchmarkDocument/counter_1000 - ns/op 200722 ns/op 198354 ns/op 1.01
BenchmarkDocument/counter_1000 - B/op 192852 B/op 192853 B/op 1.00
BenchmarkDocument/counter_1000 - allocs/op 5765 allocs/op 5765 allocs/op 1
BenchmarkDocument/counter_10000 - ns/op 2172026 ns/op 2157794 ns/op 1.01
BenchmarkDocument/counter_10000 - B/op 2087767 B/op 2087766 B/op 1.00
BenchmarkDocument/counter_10000 - allocs/op 59772 allocs/op 59772 allocs/op 1
BenchmarkDocument/object_1000 - ns/op 1366186 ns/op 1354096 ns/op 1.01
BenchmarkDocument/object_1000 - B/op 1428095 B/op 1428036 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9845 allocs/op 9845 allocs/op 1
BenchmarkDocument/object_10000 - ns/op 15091781 ns/op 15028111 ns/op 1.00
BenchmarkDocument/object_10000 - B/op 12166399 B/op 12166744 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 100560 allocs/op 100559 allocs/op 1.00
BenchmarkDocument/tree_100 - ns/op 1024448 ns/op 1049112 ns/op 0.98
BenchmarkDocument/tree_100 - B/op 943675 B/op 943678 B/op 1.00
BenchmarkDocument/tree_100 - allocs/op 6099 allocs/op 6099 allocs/op 1
BenchmarkDocument/tree_1000 - ns/op 74548952 ns/op 79782715 ns/op 0.93
BenchmarkDocument/tree_1000 - B/op 86460276 B/op 86460627 B/op 1.00
BenchmarkDocument/tree_1000 - allocs/op 60113 allocs/op 60114 allocs/op 1.00
BenchmarkDocument/tree_10000 - ns/op 9795195727 ns/op 9957562898 ns/op 0.98
BenchmarkDocument/tree_10000 - B/op 8580655000 B/op 8580990424 B/op 1.00
BenchmarkDocument/tree_10000 - allocs/op 600233 allocs/op 600232 allocs/op 1.00
BenchmarkDocument/tree_delete_all_1000 - ns/op 73891149 ns/op 77379744 ns/op 0.95
BenchmarkDocument/tree_delete_all_1000 - B/op 87012178 B/op 86990891 B/op 1.00
BenchmarkDocument/tree_delete_all_1000 - allocs/op 67752 allocs/op 67751 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_100 - ns/op 3662198 ns/op 3743356 ns/op 0.98
BenchmarkDocument/tree_edit_gc_100 - B/op 4121049 B/op 4120983 B/op 1.00
BenchmarkDocument/tree_edit_gc_100 - allocs/op 14356 allocs/op 14356 allocs/op 1
BenchmarkDocument/tree_edit_gc_1000 - ns/op 303184022 ns/op 311312288 ns/op 0.97
BenchmarkDocument/tree_edit_gc_1000 - B/op 383467710 B/op 383465558 B/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 145419 allocs/op 145406 allocs/op 1.00
BenchmarkDocument/tree_split_gc_100 - ns/op 2436436 ns/op 2564917 ns/op 0.95
BenchmarkDocument/tree_split_gc_100 - B/op 2386818 B/op 2386900 B/op 1.00
BenchmarkDocument/tree_split_gc_100 - allocs/op 10341 allocs/op 10341 allocs/op 1
BenchmarkDocument/tree_split_gc_1000 - ns/op 181830843 ns/op 194397785 ns/op 0.94
BenchmarkDocument/tree_split_gc_1000 - B/op 221991033 B/op 221990026 B/op 1.00
BenchmarkDocument/tree_split_gc_1000 - allocs/op 112253 allocs/op 112248 allocs/op 1.00
BenchmarkRPC/client_to_server - ns/op 358083196 ns/op 364396329 ns/op 0.98
BenchmarkRPC/client_to_server - B/op 17814581 B/op 18067424 B/op 0.99
BenchmarkRPC/client_to_server - allocs/op 166901 allocs/op 165863 allocs/op 1.01
BenchmarkRPC/client_to_client_via_server - ns/op 610663710 ns/op 625660123 ns/op 0.98
BenchmarkRPC/client_to_client_via_server - B/op 31769592 B/op 32815272 B/op 0.97
BenchmarkRPC/client_to_client_via_server - allocs/op 312974 allocs/op 310207 allocs/op 1.01
BenchmarkRPC/attach_large_document - ns/op 1300047489 ns/op 1355198048 ns/op 0.96
BenchmarkRPC/attach_large_document - B/op 1869062520 B/op 1868233624 B/op 1.00
BenchmarkRPC/attach_large_document - allocs/op 7522 allocs/op 7466 allocs/op 1.01
BenchmarkRPC/adminCli_to_server - ns/op 535960464 ns/op 549909416 ns/op 0.97
BenchmarkRPC/adminCli_to_server - B/op 35976596 B/op 36780108 B/op 0.98
BenchmarkRPC/adminCli_to_server - allocs/op 289635 allocs/op 288662 allocs/op 1.00
BenchmarkLocker - ns/op 64.69 ns/op 65.86 ns/op 0.98
BenchmarkLocker - B/op 16 B/op 16 B/op 1
BenchmarkLocker - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkLockerParallel - ns/op 39.02 ns/op 38.59 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 151.5 ns/op 148.9 ns/op 1.02
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 3859071 ns/op 3838436 ns/op 1.01
BenchmarkChange/Push_10_Changes - B/op 126121 B/op 125677 B/op 1.00
BenchmarkChange/Push_10_Changes - allocs/op 1254 allocs/op 1254 allocs/op 1
BenchmarkChange/Push_100_Changes - ns/op 14133298 ns/op 14440415 ns/op 0.98
BenchmarkChange/Push_100_Changes - B/op 646728 B/op 647975 B/op 1.00
BenchmarkChange/Push_100_Changes - allocs/op 6537 allocs/op 6540 allocs/op 1.00
BenchmarkChange/Push_1000_Changes - ns/op 113163898 ns/op 115497921 ns/op 0.98
BenchmarkChange/Push_1000_Changes - B/op 6088069 B/op 6151829 B/op 0.99
BenchmarkChange/Push_1000_Changes - allocs/op 62159 allocs/op 62159 allocs/op 1
BenchmarkChange/Pull_10_Changes - ns/op 2919788 ns/op 2909758 ns/op 1.00
BenchmarkChange/Pull_10_Changes - B/op 100669 B/op 100076 B/op 1.01
BenchmarkChange/Pull_10_Changes - allocs/op 952 allocs/op 952 allocs/op 1
BenchmarkChange/Pull_100_Changes - ns/op 4476158 ns/op 4414877 ns/op 1.01
BenchmarkChange/Pull_100_Changes - B/op 257446 B/op 256121 B/op 1.01
BenchmarkChange/Pull_100_Changes - allocs/op 3153 allocs/op 3154 allocs/op 1.00
BenchmarkChange/Pull_1000_Changes - ns/op 8450701 ns/op 8566513 ns/op 0.99
BenchmarkChange/Pull_1000_Changes - B/op 1396439 B/op 1392837 B/op 1.00
BenchmarkChange/Pull_1000_Changes - allocs/op 26869 allocs/op 26865 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - ns/op 16996516 ns/op 17384863 ns/op 0.98
BenchmarkSnapshot/Push_3KB_snapshot - B/op 806689 B/op 802328 B/op 1.01
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op 6544 allocs/op 6549 allocs/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - ns/op 117363524 ns/op 118971166 ns/op 0.99
BenchmarkSnapshot/Push_30KB_snapshot - B/op 6195858 B/op 6156721 B/op 1.01
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op 62164 allocs/op 62158 allocs/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op 6771197 ns/op 6602183 ns/op 1.03
BenchmarkSnapshot/Pull_3KB_snapshot - B/op 903944 B/op 902235 B/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op 14876 allocs/op 14878 allocs/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op 15380898 ns/op 14754933 ns/op 1.04
BenchmarkSnapshot/Pull_30KB_snapshot - B/op 6984156 B/op 6981411 B/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op 144144 allocs/op 144131 allocs/op 1.00
BenchmarkSync/memory_sync_10_test - ns/op 6808 ns/op 6984 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 - ns/op 51564 ns/op 51752 ns/op 1.00
BenchmarkSync/memory_sync_100_test - B/op 8655 B/op 8655 B/op 1
BenchmarkSync/memory_sync_100_test - allocs/op 274 allocs/op 274 allocs/op 1
BenchmarkSync/memory_sync_1000_test - ns/op 577601 ns/op 593943 ns/op 0.97
BenchmarkSync/memory_sync_1000_test - B/op 74925 B/op 74410 B/op 1.01
BenchmarkSync/memory_sync_1000_test - allocs/op 2146 allocs/op 2113 allocs/op 1.02
BenchmarkSync/memory_sync_10000_test - ns/op 7189822 ns/op 7699568 ns/op 0.93
BenchmarkSync/memory_sync_10000_test - B/op 764157 B/op 761656 B/op 1.00
BenchmarkSync/memory_sync_10000_test - allocs/op 20565 allocs/op 20495 allocs/op 1.00
BenchmarkTextEditing - ns/op 18902112632 ns/op 19296651559 ns/op 0.98
BenchmarkTextEditing - B/op 9041808112 B/op 9041594456 B/op 1.00
BenchmarkTextEditing - allocs/op 19921704 allocs/op 19920775 allocs/op 1.00

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

Please sign in to comment.