Skip to content

Commit

Permalink
test error assertion & rollback formatting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
emplam27 committed Apr 26, 2023
1 parent 5b1460e commit adb262c
Show file tree
Hide file tree
Showing 23 changed files with 145 additions and 118 deletions.
18 changes: 9 additions & 9 deletions api/converter/from_bytes.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,43 +163,43 @@ func fromJSONText(
) (*crdt.Text, error) {
createdAt, err := fromTimeTicket(pbText.CreatedAt)
if err != nil {
return nil, fmt.Errorf("from bytes fromJsonText: %w", err)
return nil, err
}
movedAt, err := fromTimeTicket(pbText.MovedAt)
if err != nil {
return nil, fmt.Errorf("from bytes fromJsonText: %w", err)
return nil, err
}
removedAt, err := fromTimeTicket(pbText.RemovedAt)
if err != nil {
return nil, fmt.Errorf("from bytes fromJsonText: %w", err)
return nil, err
}

rgaTreeSplit, err := crdt.NewRGATreeSplit(crdt.InitialTextNode())
if err != nil {
return nil, fmt.Errorf("from bytes fromJsonText: %w", err)
return nil, err
}

current := rgaTreeSplit.InitialHead()
for _, pbNode := range pbText.Nodes {
textNode, err := fromTextNode(pbNode)
if err != nil {
return nil, fmt.Errorf("from bytes fromJsonText: %w", err)
return nil, err
}
current, err = rgaTreeSplit.InsertAfter(current, textNode)
if err != nil {
return nil, fmt.Errorf("from bytes fromJsonText: %w", err)
return nil, err
}
insPrevID, err := fromTextNodeID(pbNode.InsPrevId)
if err != nil {
return nil, fmt.Errorf("from bytes fromJsonText: %w", err)
return nil, err
}
if insPrevID != nil {
insPrevNode, err := rgaTreeSplit.FindNode(insPrevID)
if err != nil {
return nil, fmt.Errorf("from bytes fromJsonText: %w", err)
return nil, err
}
if insPrevNode == nil {
return nil, fmt.Errorf("from bytes fromJsonText: insPrevNode should be presence")
return nil, fmt.Errorf("insPrevNode should be presence")
}
current.SetInsPrev(insPrevNode)
}
Expand Down
4 changes: 1 addition & 3 deletions pkg/document/crdt/array.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
package crdt

import (
"fmt"

"github.com/yorkie-team/yorkie/pkg/document/time"
)

Expand Down Expand Up @@ -103,7 +101,7 @@ func (a *Array) DeepCopy() (Element, error) {
for _, node := range a.elements.Nodes() {
copiedNode, err := node.elem.DeepCopy()
if err != nil {
return nil, fmt.Errorf("crdt array DeepCopy: %w", err)
return nil, err
}
elements.Add(copiedNode)
}
Expand Down
4 changes: 1 addition & 3 deletions pkg/document/crdt/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
package crdt

import (
"fmt"

"github.com/yorkie-team/yorkie/pkg/document/time"
)

Expand Down Expand Up @@ -102,7 +100,7 @@ func (o *Object) DeepCopy() (Element, error) {
for _, node := range o.memberNodes.Nodes() {
copiedNode, err := node.elem.DeepCopy()
if err != nil {
return nil, fmt.Errorf("crdt object DeepCopy: %w", err)
return nil, err
}
members.Set(node.key, copiedNode)
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/document/crdt/primitive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ func TestPrimitive(t *testing.T) {
assert.Equal(t, prim.Value(), crdt.ValueFromBytes(prim.ValueType(), prim.Bytes()))
assert.Equal(t, prim.Marshal(), test.marshal)

copied, _ := prim.DeepCopy()
copied, err := prim.DeepCopy()
assert.NoError(t, err)
assert.Equal(t, prim.CreatedAt(), copied.CreatedAt())
assert.Equal(t, prim.MovedAt(), copied.MovedAt())
assert.Equal(t, prim.Marshal(), copied.Marshal())
Expand Down
28 changes: 14 additions & 14 deletions pkg/document/crdt/rga_tree_split.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func NewRGATreeSplitNodeID(createdAt *time.Ticket, offset int) *RGATreeSplitNode
// id==other, -1 if id < other, and +1 if id > other.
func (id *RGATreeSplitNodeID) Compare(other llrb.Key) (int, error) {
if id == nil || other == nil {
return 0, fmt.Errorf("rga tree split Compare: RGATreeSplitNodeID cannot be null")
return 0, fmt.Errorf("RGATreeSplitNodeID cannot be null")
}

o := other.(*RGATreeSplitNodeID)
Expand All @@ -67,7 +67,7 @@ func (id *RGATreeSplitNodeID) Compare(other llrb.Key) (int, error) {
func (id *RGATreeSplitNodeID) Equal(other llrb.Key) (bool, error) {
keyCompare, err := id.Compare(other)
if err != nil {
return false, fmt.Errorf("rga tree split Equal: %w", err)
return false, err
}
return keyCompare == 0, nil
}
Expand Down Expand Up @@ -142,7 +142,7 @@ func (pos *RGATreeSplitNodePos) RelativeOffset() int {
func (pos *RGATreeSplitNodePos) Equal(other *RGATreeSplitNodePos) (bool, error) {
result, err := pos.id.Equal(other.id)
if err != nil {
return false, fmt.Errorf("rga tree split Equal: %w", err)
return false, err
}
if !result {
return false, nil
Expand Down Expand Up @@ -308,7 +308,7 @@ func NewRGATreeSplit[V RGATreeSplitValue](initialHead *RGATreeSplitNode[V]) (*RG
treeByID := llrb.NewTree[*RGATreeSplitNodeID, *RGATreeSplitNode[V]]()
_, err := treeByID.Put(initialHead.ID(), initialHead)
if err != nil {
return nil, fmt.Errorf("rga tree split NewRGATreeSplit: %w", err)
return nil, err
}

return &RGATreeSplit[V]{
Expand Down Expand Up @@ -344,14 +344,14 @@ func (s *RGATreeSplit[V]) findNodeWithSplit(
absoluteID := pos.getAbsoluteID()
node, err := s.findFloorNodePreferToLeft(absoluteID)
if err != nil {
return nil, nil, fmt.Errorf("findNodeWithSplit: %w", err)
return nil, nil, err
}

relativeOffset := absoluteID.offset - node.id.offset

_, err = s.splitNode(node, relativeOffset)
if err != nil {
return nil, nil, fmt.Errorf("findNodeWithSplit: %w", err)
return nil, nil, err
}

for node.next != nil && node.next.createdAt().After(updatedAt) {
Expand All @@ -364,11 +364,11 @@ func (s *RGATreeSplit[V]) findNodeWithSplit(
func (s *RGATreeSplit[V]) findFloorNodePreferToLeft(id *RGATreeSplitNodeID) (*RGATreeSplitNode[V], error) {
node, err := s.findFloorNode(id)
if err != nil {
return nil, fmt.Errorf("findFloorNodePreferToLeft: %w", err)
return nil, err
}
if node == nil {
return nil,
fmt.Errorf("findFloorNodePreferToLeft: the node of the given id should be found: " + s.StructureAsString())
fmt.Errorf("the node of the given id should be found: " + s.StructureAsString())
}

if id.offset > 0 && node.id.offset == id.offset {
Expand All @@ -384,7 +384,7 @@ func (s *RGATreeSplit[V]) findFloorNodePreferToLeft(id *RGATreeSplitNodeID) (*RG

func (s *RGATreeSplit[V]) splitNode(node *RGATreeSplitNode[V], offset int) (*RGATreeSplitNode[V], error) {
if offset > node.contentLen() {
return nil, fmt.Errorf("splitNode: offset should be less than or equal to length: " + s.StructureAsString())
return nil, fmt.Errorf("offset should be less than or equal to length: " + s.StructureAsString())
}

if offset == 0 {
Expand All @@ -397,7 +397,7 @@ func (s *RGATreeSplit[V]) splitNode(node *RGATreeSplitNode[V], offset int) (*RGA
s.treeByIndex.UpdateWeight(splitNode.indexNode)
_, err := s.InsertAfter(node, splitNode)
if err != nil {
return nil, fmt.Errorf("splitNode: %w", err)
return nil, err
}

insNext := node.insNext
Expand All @@ -419,7 +419,7 @@ func (s *RGATreeSplit[V]) InsertAfter(prev, node *RGATreeSplitNode[V]) (*RGATree

_, err := s.treeByID.Put(node.id, node)
if err != nil {
return nil, fmt.Errorf("rga tree split InsertAfter: %w", err)
return nil, err
}
s.treeByIndex.InsertAfter(prev.indexNode, node.indexNode)

Expand All @@ -439,7 +439,7 @@ func (s *RGATreeSplit[V]) FindNode(id *RGATreeSplitNodeID) (*RGATreeSplitNode[V]

node, err := s.findFloorNode(id)
if err != nil {
return nil, fmt.Errorf("rga tree split FindNode: %w", err)
return nil, err
}

return node, nil
Expand All @@ -454,15 +454,15 @@ func (s *RGATreeSplit[V]) CheckWeight() bool {
func (s *RGATreeSplit[V]) findFloorNode(id *RGATreeSplitNodeID) (*RGATreeSplitNode[V], error) {
key, value, err := s.treeByID.Floor(id)
if err != nil {
return nil, fmt.Errorf("rga tree split findFloorNode: %w", err)
return nil, err
}
if key == nil {
return nil, nil
}

result, err := key.Equal(id)
if err != nil {
return nil, fmt.Errorf("rga tree split findFloorNode: %w", err)
return nil, err
}
if !result && !key.hasSameCreatedAt(id) {
return nil, nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/document/crdt/rga_tree_split_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func TestRGATreeSplit(t *testing.T) {
t.Run("compare nil id panic test", func(t *testing.T) {
t.Run("compare nil id error test", func(t *testing.T) {
id := crdt.NewRGATreeSplitNodeID(time.InitialTicket, 0)
_, err := id.Compare(nil)
assert.Errorf(t, err, "ID cannot be null")
Expand Down
6 changes: 2 additions & 4 deletions pkg/document/crdt/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
package crdt

import (
"fmt"

"github.com/yorkie-team/yorkie/pkg/document/time"
)

Expand Down Expand Up @@ -106,7 +104,7 @@ func (r *Root) RegisterTextElementWithGarbage(textType TextElement) {
func (r *Root) DeepCopy() (*Root, error) {
copiedObject, err := r.object.DeepCopy()
if err != nil {
return nil, fmt.Errorf("crdt root DeepCopy: %w", err)
return nil, err
}
return NewRoot(copiedObject.(*Object)), nil
}
Expand All @@ -125,7 +123,7 @@ func (r *Root) GarbageCollect(ticket *time.Ticket) (int, error) {
for _, text := range r.textElementWithGarbageMapByCreatedAt {
purgedTextNodes, err := text.purgeTextNodesWithGarbage(ticket)
if err != nil {
return 0, fmt.Errorf("crdt root GarbageCollect: %w", err)
return 0, err
}
if purgedTextNodes > 0 {
delete(r.textElementWithGarbageMapByCreatedAt, text.CreatedAt().Key())
Expand Down
48 changes: 32 additions & 16 deletions pkg/document/crdt/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ func TestRoot(t *testing.T) {
assert.Equal(t, "[0,2]", array.Marshal())
assert.Equal(t, 1, root.GarbageLen())

gc, _ := root.GarbageCollect(time.MaxTicket)
gc, err := root.GarbageCollect(time.MaxTicket)
assert.NoError(t, err)
assert.Equal(t, 1, gc)
assert.Equal(t, 0, root.GarbageLen())
})
Expand All @@ -62,25 +63,29 @@ func TestRoot(t *testing.T) {
text := crdt.NewText(rgaTreeSplit, ctx.IssueTimeTicket())

fromPos, toPos := text.CreateRange(0, 0)
_, _, _ = text.Edit(fromPos, toPos, nil, "Hello World", nil, ctx.IssueTimeTicket())
_, _, err := text.Edit(fromPos, toPos, nil, "Hello World", nil, ctx.IssueTimeTicket())
assert.NoError(t, err)
registerTextElementWithGarbage(fromPos, toPos, root, text)
assert.Equal(t, "Hello World", text.String())
assert.Equal(t, 0, root.GarbageLen())

fromPos, toPos = text.CreateRange(5, 10)
_, _, _ = text.Edit(fromPos, toPos, nil, "Yorkie", nil, ctx.IssueTimeTicket())
_, _, err = text.Edit(fromPos, toPos, nil, "Yorkie", nil, ctx.IssueTimeTicket())
assert.NoError(t, err)
registerTextElementWithGarbage(fromPos, toPos, root, text)
assert.Equal(t, "HelloYorkied", text.String())
assert.Equal(t, 1, root.GarbageLen())

fromPos, toPos = text.CreateRange(0, 5)
_, _, _ = text.Edit(fromPos, toPos, nil, "", nil, ctx.IssueTimeTicket())
_, _, err = text.Edit(fromPos, toPos, nil, "", nil, ctx.IssueTimeTicket())
assert.NoError(t, err)
registerTextElementWithGarbage(fromPos, toPos, root, text)
assert.Equal(t, "Yorkied", text.String())
assert.Equal(t, 2, root.GarbageLen())

fromPos, toPos = text.CreateRange(6, 7)
_, _, _ = text.Edit(fromPos, toPos, nil, "", nil, ctx.IssueTimeTicket())
_, _, err = text.Edit(fromPos, toPos, nil, "", nil, ctx.IssueTimeTicket())
assert.NoError(t, err)
registerTextElementWithGarbage(fromPos, toPos, root, text)
assert.Equal(t, "Yorkie", text.String())
assert.Equal(t, 3, root.GarbageLen())
Expand All @@ -90,7 +95,8 @@ func TestRoot(t *testing.T) {
nodeLen := len(text.Nodes())
assert.Equal(t, 4, nodeLen)

gc, _ := root.GarbageCollect(time.MaxTicket)
gc, err := root.GarbageCollect(time.MaxTicket)
assert.NoError(t, err)
assert.Equal(t, 3, gc)
assert.Equal(t, 0, root.GarbageLen())
nodeLen = len(text.Nodes())
Expand All @@ -108,7 +114,8 @@ func TestRoot(t *testing.T) {

root := helper.TestRoot()
ctx := helper.TextChangeContext(root)
rgaTreeSplit, _ := crdt.NewRGATreeSplit(crdt.InitialTextNode())
rgaTreeSplit, err := crdt.NewRGATreeSplit(crdt.InitialTextNode())
assert.NoError(t, err)
text := crdt.NewText(rgaTreeSplit, ctx.IssueTimeTicket())

tests := []test{
Expand All @@ -120,37 +127,43 @@ func TestRoot(t *testing.T) {

for _, tc := range tests {
fromPos, toPos := text.CreateRange(tc.from, tc.to)
_, _, _ = text.Edit(fromPos, toPos, nil, tc.content, nil, ctx.IssueTimeTicket())
_, _, err = text.Edit(fromPos, toPos, nil, tc.content, nil, ctx.IssueTimeTicket())
assert.NoError(t, err)
registerTextElementWithGarbage(fromPos, toPos, root, text)
assert.Equal(t, tc.want, text.String())
assert.Equal(t, tc.garbage, root.GarbageLen())
}

gc, _ := root.GarbageCollect(time.MaxTicket)
gc, err := root.GarbageCollect(time.MaxTicket)
assert.NoError(t, err)
assert.Equal(t, 3, gc)
assert.Equal(t, 0, root.GarbageLen())
})

t.Run("garbage collection for rich text test", func(t *testing.T) {
root := helper.TestRoot()
ctx := helper.TextChangeContext(root)
rgaTreeSplit, _ := crdt.NewRGATreeSplit(crdt.InitialTextNode())
rgaTreeSplit, err := crdt.NewRGATreeSplit(crdt.InitialTextNode())
assert.NoError(t, err)
text := crdt.NewText(rgaTreeSplit, ctx.IssueTimeTicket())

fromPos, toPos := text.CreateRange(0, 0)
_, _, _ = text.Edit(fromPos, toPos, nil, "Hello World", nil, ctx.IssueTimeTicket())
_, _, err = text.Edit(fromPos, toPos, nil, "Hello World", nil, ctx.IssueTimeTicket())
assert.NoError(t, err)
registerTextElementWithGarbage(fromPos, toPos, root, text)
assert.Equal(t, `[{"val":"Hello World"}]`, text.Marshal())
assert.Equal(t, 0, root.GarbageLen())

fromPos, toPos = text.CreateRange(6, 11)
_, _, _ = text.Edit(fromPos, toPos, nil, "Yorkie", nil, ctx.IssueTimeTicket())
_, _, err = text.Edit(fromPos, toPos, nil, "Yorkie", nil, ctx.IssueTimeTicket())
assert.NoError(t, err)
registerTextElementWithGarbage(fromPos, toPos, root, text)
assert.Equal(t, `[{"val":"Hello "},{"val":"Yorkie"}]`, text.Marshal())
assert.Equal(t, 1, root.GarbageLen())

fromPos, toPos = text.CreateRange(0, 6)
_, _, _ = text.Edit(fromPos, toPos, nil, "", nil, ctx.IssueTimeTicket())
_, _, err = text.Edit(fromPos, toPos, nil, "", nil, ctx.IssueTimeTicket())
assert.NoError(t, err)
registerTextElementWithGarbage(fromPos, toPos, root, text)
assert.Equal(t, `[{"val":"Yorkie"}]`, text.Marshal())
assert.Equal(t, 2, root.GarbageLen())
Expand All @@ -160,7 +173,8 @@ func TestRoot(t *testing.T) {
nodeLen := len(text.Nodes())
assert.Equal(t, 3, nodeLen)

gc, _ := root.GarbageCollect(time.MaxTicket)
gc, err := root.GarbageCollect(time.MaxTicket)
assert.NoError(t, err)
assert.Equal(t, 2, gc)
assert.Equal(t, 0, root.GarbageLen())

Expand All @@ -187,7 +201,8 @@ func TestRoot(t *testing.T) {
assert.Equal(t, `{"1":1,"3":3}`, obj.Marshal())
assert.Equal(t, 4, root.GarbageLen())

gc, _ := root.GarbageCollect(time.MaxTicket)
gc, err := root.GarbageCollect(time.MaxTicket)
assert.NoError(t, err)
assert.Equal(t, 4, gc)
assert.Equal(t, 0, root.GarbageLen())

Expand All @@ -196,7 +211,8 @@ func TestRoot(t *testing.T) {
assert.Equal(t, `{"1":1}`, obj.Marshal())
assert.Equal(t, 1, root.GarbageLen())

gc, _ = root.GarbageCollect(time.MaxTicket)
gc, err = root.GarbageCollect(time.MaxTicket)
assert.NoError(t, err)
assert.Equal(t, 1, gc)
assert.Equal(t, 0, root.GarbageLen())
})
Expand Down
Loading

1 comment on commit adb262c

@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: adb262c Previous: 459a087 Ratio
BenchmarkDocument/constructor_test 1244 ns/op 752 B/op 12 allocs/op 1247 ns/op 752 B/op 12 allocs/op 1.00
BenchmarkDocument/status_test 648.8 ns/op 720 B/op 10 allocs/op 633.6 ns/op 720 B/op 10 allocs/op 1.02
BenchmarkDocument/equals_test 6931 ns/op 5072 B/op 85 allocs/op 7340 ns/op 5072 B/op 85 allocs/op 0.94
BenchmarkDocument/nested_update_test 20867 ns/op 11033 B/op 235 allocs/op 20467 ns/op 11033 B/op 235 allocs/op 1.02
BenchmarkDocument/delete_test 26546 ns/op 14161 B/op 310 allocs/op 27395 ns/op 14162 B/op 310 allocs/op 0.97
BenchmarkDocument/object_test 9123 ns/op 5792 B/op 97 allocs/op 11966 ns/op 5793 B/op 97 allocs/op 0.76
BenchmarkDocument/array_test 37990 ns/op 10889 B/op 251 allocs/op 34371 ns/op 10889 B/op 251 allocs/op 1.11
BenchmarkDocument/text_test 35602 ns/op 14058 B/op 456 allocs/op 37156 ns/op 14058 B/op 456 allocs/op 0.96
BenchmarkDocument/text_composition_test 37283 ns/op 17538 B/op 461 allocs/op 37973 ns/op 17538 B/op 461 allocs/op 0.98
BenchmarkDocument/rich_text_test 96275 ns/op 36007 B/op 1108 allocs/op 99353 ns/op 36007 B/op 1108 allocs/op 0.97
BenchmarkDocument/counter_test 18740 ns/op 9057 B/op 212 allocs/op 19592 ns/op 9057 B/op 212 allocs/op 0.96
BenchmarkDocument/text_edit_gc_100 3901907 ns/op 1552378 B/op 17147 allocs/op 4012725 ns/op 1552921 B/op 17149 allocs/op 0.97
BenchmarkDocument/text_edit_gc_1000 311558497 ns/op 136647628 B/op 210785 allocs/op 320235872 ns/op 136628348 B/op 210675 allocs/op 0.97
BenchmarkDocument/text_split_gc_100 4484331 ns/op 2217490 B/op 16577 allocs/op 4592047 ns/op 2216704 B/op 16573 allocs/op 0.98
BenchmarkDocument/text_split_gc_1000 360561898 ns/op 214875122 B/op 211486 allocs/op 374445052 ns/op 214883208 B/op 211530 allocs/op 0.96
BenchmarkDocument/text_delete_all_10000 18807346 ns/op 5903792 B/op 41118 allocs/op 15372242 ns/op 5904483 B/op 41123 allocs/op 1.22
BenchmarkDocument/text_delete_all_100000 275505400 ns/op 53858960 B/op 416042 allocs/op 187614474 ns/op 53837776 B/op 415966 allocs/op 1.47
BenchmarkDocument/text_100 303148 ns/op 117749 B/op 5064 allocs/op 304425 ns/op 117746 B/op 5064 allocs/op 1.00
BenchmarkDocument/text_1000 3423026 ns/op 1152328 B/op 50068 allocs/op 3329989 ns/op 1152350 B/op 50068 allocs/op 1.03
BenchmarkDocument/array_1000 1700860 ns/op 1102026 B/op 11854 allocs/op 1686158 ns/op 1102064 B/op 11854 allocs/op 1.01
BenchmarkDocument/array_10000 19180245 ns/op 9906293 B/op 120707 allocs/op 18075994 ns/op 9908209 B/op 120713 allocs/op 1.06
BenchmarkDocument/array_gc_100 173184 ns/op 97405 B/op 1226 allocs/op 177129 ns/op 97407 B/op 1226 allocs/op 0.98
BenchmarkDocument/array_gc_1000 1918503 ns/op 1169621 B/op 12889 allocs/op 1936804 ns/op 1169628 B/op 12889 allocs/op 0.99
BenchmarkDocument/counter_1000 277665 ns/op 197874 B/op 6490 allocs/op 265789 ns/op 197878 B/op 6490 allocs/op 1.04
BenchmarkDocument/counter_10000 3043359 ns/op 2164798 B/op 69497 allocs/op 2859453 ns/op 2164795 B/op 69497 allocs/op 1.06
BenchmarkDocument/object_1000 1816739 ns/op 1450510 B/op 9901 allocs/op 1798211 ns/op 1450338 B/op 9901 allocs/op 1.01
BenchmarkDocument/object_10000 22905307 ns/op 12369643 B/op 101209 allocs/op 20932024 ns/op 12368259 B/op 101206 allocs/op 1.09
BenchmarkRPC/client_to_server 450422505 ns/op 17928733 B/op 308578 allocs/op 388824898 ns/op 17766848 B/op 305462 allocs/op 1.16
BenchmarkRPC/client_to_client_via_server 755203909 ns/op 32749804 B/op 563136 allocs/op 685408721 ns/op 32465260 B/op 557679 allocs/op 1.10
BenchmarkRPC/attach_large_document 1575369620 ns/op 2134809664 B/op 10019 allocs/op 1579978747 ns/op 2125291848 B/op 9971 allocs/op 1.00
BenchmarkRPC/adminCli_to_server 559049297 ns/op 19821952 B/op 322100 allocs/op 522172950 ns/op 19820780 B/op 322122 allocs/op 1.07
BenchmarkLocker 122.6 ns/op 16 B/op 1 allocs/op 123.3 ns/op 16 B/op 1 allocs/op 0.99
BenchmarkLockerParallel 117.5 ns/op 0 B/op 0 allocs/op 115.3 ns/op 0 B/op 0 allocs/op 1.02
BenchmarkLockerMoreKeys 281.6 ns/op 15 B/op 0 allocs/op 317.6 ns/op 14 B/op 0 allocs/op 0.89
BenchmarkSync/memory_sync_10_test 6875 ns/op 1340 B/op 39 allocs/op 6897 ns/op 1341 B/op 39 allocs/op 1.00
BenchmarkSync/memory_sync_100_test 61439 ns/op 9001 B/op 293 allocs/op 57318 ns/op 9120 B/op 300 allocs/op 1.07
BenchmarkSync/memory_sync_1000_test 671432 ns/op 82486 B/op 2623 allocs/op 596791 ns/op 84500 B/op 2748 allocs/op 1.13
BenchmarkSync/memory_sync_10000_test 7315007 ns/op 854720 B/op 26815 allocs/op 6360069 ns/op 870282 B/op 27696 allocs/op 1.15
BenchmarkTextEditing 26641721293 ns/op 8436103888 B/op 19834808 allocs/op 24061894302 ns/op 8435903120 B/op 19834107 allocs/op 1.11

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

Please sign in to comment.