Skip to content

Commit

Permalink
Rename StructureAsString to toTestString
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerwins committed Nov 1, 2023
1 parent 107498e commit 12f3892
Show file tree
Hide file tree
Showing 15 changed files with 99 additions and 93 deletions.
2 changes: 1 addition & 1 deletion api/converter/converter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func TestConverter(t *testing.T) {
pbNodes := converter.ToTreeNodes(root)
clone, err := converter.FromTreeNodes(pbNodes)
assert.NoError(t, err)
assert.Equal(t, crdt.ToStructure(root), crdt.ToStructure(clone))
assert.Equal(t, crdt.ToTreeNodeForTest(root), crdt.ToTreeNodeForTest(clone))
assert.Equal(t, crdt.ToXML(root), crdt.ToXML(clone))
})

Expand Down
6 changes: 3 additions & 3 deletions pkg/document/crdt/array.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ func (a *Array) Marshal() string {
return a.elements.Marshal()
}

// StructureAsString returns a String containing the metadata of the elements
// ToTestString returns a String containing the metadata of the elements
// for debugging purpose.
func (a *Array) StructureAsString() string {
return a.elements.StructureAsString()
func (a *Array) ToTestString() string {
return a.elements.ToTestString()
}

// DeepCopy copies itself deeply.
Expand Down
6 changes: 3 additions & 3 deletions pkg/document/crdt/rga_tree_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ func (a *RGATreeList) Len() int {
return a.nodeMapByIndex.Len()
}

// StructureAsString returns a String containing the metadata of the node id
// ToTestString returns a String containing the metadata of the node id
// for debugging purpose.
func (a *RGATreeList) StructureAsString() string {
return a.nodeMapByIndex.StructureAsString()
func (a *RGATreeList) ToTestString() string {
return a.nodeMapByIndex.ToTestString()
}

// Delete deletes the node of the given index.
Expand Down
32 changes: 16 additions & 16 deletions pkg/document/crdt/rga_tree_split.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type RGATreeSplitValue interface {
DeepCopy() RGATreeSplitValue
String() string
Marshal() string
structureAsString() string
toTestString() string
}

// RGATreeSplitNodeID is an ID of RGATreeSplitNode.
Expand Down Expand Up @@ -85,10 +85,10 @@ func (id *RGATreeSplitNodeID) Split(offset int) *RGATreeSplitNodeID {
return NewRGATreeSplitNodeID(id.createdAt, id.offset+offset)
}

// StructureAsString returns a String containing the metadata of the node id
// ToTestString returns a String containing the metadata of the node id
// for debugging purpose.
func (id *RGATreeSplitNodeID) StructureAsString() string {
return fmt.Sprintf("%s:%d", id.createdAt.StructureAsString(), id.offset)
func (id *RGATreeSplitNodeID) ToTestString() string {
return fmt.Sprintf("%s:%d", id.createdAt.ToTestString(), id.offset)
}

func (id *RGATreeSplitNodeID) hasSameCreatedAt(other *RGATreeSplitNodeID) bool {
Expand Down Expand Up @@ -120,10 +120,10 @@ func (pos *RGATreeSplitNodePos) getAbsoluteID() *RGATreeSplitNodeID {
return NewRGATreeSplitNodeID(pos.id.createdAt, pos.id.offset+pos.relativeOffset)
}

// StructureAsString returns a String containing the metadata of the position
// ToTestString returns a String containing the metadata of the position
// for debugging purpose.
func (pos *RGATreeSplitNodePos) StructureAsString() string {
return fmt.Sprintf("%s:%d", pos.id.StructureAsString(), pos.relativeOffset)
func (pos *RGATreeSplitNodePos) ToTestString() string {
return fmt.Sprintf("%s:%d", pos.id.ToTestString(), pos.relativeOffset)
}

// ID returns the ID of this RGATreeSplitNodePos.
Expand Down Expand Up @@ -245,10 +245,10 @@ func (s *RGATreeSplitNode[V]) createdAt() *time.Ticket {
return s.id.createdAt
}

// structureAsString returns a String containing the metadata of the node
// toTestString returns a String containing the metadata of the node
// for debugging purpose.
func (s *RGATreeSplitNode[V]) structureAsString() string {
return fmt.Sprintf("%s %s", s.id.StructureAsString(), s.value.structureAsString())
func (s *RGATreeSplitNode[V]) toTestString() string {
return fmt.Sprintf("%s %s", s.id.ToTestString(), s.value.toTestString())
}

// Remove removes this node if it created before the time of deletion are
Expand Down Expand Up @@ -357,7 +357,7 @@ func (s *RGATreeSplit[V]) findNodeWithSplit(
func (s *RGATreeSplit[V]) findFloorNodePreferToLeft(id *RGATreeSplitNodeID) (*RGATreeSplitNode[V], error) {
node := s.findFloorNode(id)
if node == nil {
return nil, fmt.Errorf("the node of the given id should be found: " + s.StructureAsString())
return nil, fmt.Errorf("the node of the given id should be found: " + s.ToTestString())
}

if id.offset > 0 && node.id.offset == id.offset {
Expand All @@ -373,7 +373,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("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.ToTestString())
}

if offset == 0 {
Expand Down Expand Up @@ -599,17 +599,17 @@ func (s *RGATreeSplit[V]) nodes() []*RGATreeSplitNode[V] {
return nodes
}

// StructureAsString returns a String containing the metadata of the nodes
// ToTestString returns a String containing the metadata of the nodes
// for debugging purpose.
func (s *RGATreeSplit[V]) StructureAsString() string {
func (s *RGATreeSplit[V]) ToTestString() string {
builder := strings.Builder{}

node := s.initialHead
for node != nil {
if node.removedAt != nil {
builder.WriteString(fmt.Sprintf("{%s}", node.structureAsString()))
builder.WriteString(fmt.Sprintf("{%s}", node.toTestString()))
} else {
builder.WriteString(fmt.Sprintf("[%s]", node.structureAsString()))
builder.WriteString(fmt.Sprintf("[%s]", node.toTestString()))
}
node = node.next
}
Expand Down
10 changes: 5 additions & 5 deletions pkg/document/crdt/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ func (t *TextValue) Marshal() string {
)
}

// structureAsString returns a String containing the metadata of this value
// toTestString returns a String containing the metadata of this value
// for debugging purpose.
func (t *TextValue) structureAsString() string {
func (t *TextValue) toTestString() string {
return fmt.Sprintf(
`%s "%s"`,
t.attrs.Marshal(),
Expand Down Expand Up @@ -309,10 +309,10 @@ func (t *Text) Nodes() []*RGATreeSplitNode[*TextValue] {
return t.rgaTreeSplit.nodes()
}

// StructureAsString returns a String containing the metadata of the text
// ToTestString returns a String containing the metadata of the text
// for debugging purpose.
func (t *Text) StructureAsString() string {
return t.rgaTreeSplit.StructureAsString()
func (t *Text) ToTestString() string {
return t.rgaTreeSplit.ToTestString()
}

// CheckWeight returns false when there is an incorrect weight node.
Expand Down
14 changes: 7 additions & 7 deletions pkg/document/crdt/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func NewTreeNode(id *TreeNodeID, nodeType string, attributes *RHT, value ...stri

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

// Compare compares the given two CRDTTreePos.
Expand Down Expand Up @@ -895,9 +895,9 @@ func (t *Tree) toTreeNodes(pos *TreePos) (*TreeNode, *TreeNode) {
return parentNode, leftSiblingNode
}

// Structure returns the structure of this tree.
func (t *Tree) Structure() TreeNodeForTest {
return ToStructure(t.Root())
// ToTreeNodeForTest returns the JSON of this tree for debugging.
func (t *Tree) ToTreeNodeForTest() TreeNodeForTest {
return ToTreeNodeForTest(t.Root())
}

// PathToPos returns the position of the given path
Expand All @@ -915,8 +915,8 @@ func (t *Tree) PathToPos(path []int) (*TreePos, error) {
return pos, nil
}

// ToStructure returns the JSON of this tree for debugging.
func ToStructure(node *TreeNode) TreeNodeForTest {
// ToTreeNodeForTest returns the JSON of this tree for debugging.
func ToTreeNodeForTest(node *TreeNode) TreeNodeForTest {
if node.IsText() {
currentNode := node
return TreeNodeForTest{
Expand All @@ -929,7 +929,7 @@ func ToStructure(node *TreeNode) TreeNodeForTest {

var children []TreeNodeForTest
for _, child := range node.IndexTreeNode.Children() {
children = append(children, ToStructure(child.Value))
children = append(children, ToTreeNodeForTest(child.Value))
}

return TreeNodeForTest{
Expand Down
8 changes: 4 additions & 4 deletions pkg/document/crdt/tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func TestTree(t *testing.T) {
},
Size: 15,
IsRemoved: false,
}, tree.Structure())
}, tree.ToTreeNodeForTest())

// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// <root> <p> h e l l o ~ ! </p> <p> w o r l d </p> </root>
Expand Down Expand Up @@ -205,7 +205,7 @@ func TestTree(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "<root><p>ab</p><p>cd</p></root>", tree.ToXML())

structure := tree.Structure()
structure := tree.ToTreeNodeForTest()
assert.Equal(t, 8, structure.Size)
assert.Equal(t, 2, structure.Children[0].Size)
assert.Equal(t, 2, structure.Children[0].Children[0].Size)
Expand All @@ -217,7 +217,7 @@ func TestTree(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "<root><p>a</p><p>cd</p></root>", tree.ToXML())

structure = tree.Structure()
structure = tree.ToTreeNodeForTest()
assert.Equal(t, 7, structure.Size)
assert.Equal(t, 1, structure.Children[0].Size)
assert.Equal(t, 1, structure.Children[0].Children[0].Size)
Expand Down Expand Up @@ -254,7 +254,7 @@ func TestTree(t *testing.T) {
// TODO(sejongk): Use the below assertions after implementing Tree.Move.
// assert.Equal(t, "<root><p>ad</p></root>", tree.ToXML())

// structure := tree.Structure()
// structure := tree.ToTreeNodeForTest()
// assert.Equal(t, 4, structure.Size)
// assert.Equal(t, 2, structure.Children[0].Size)
// assert.Equal(t, 1, structure.Children[0].Children[0].Size)
Expand Down
38 changes: 19 additions & 19 deletions pkg/document/document_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,22 +130,22 @@ func TestDocument(t *testing.T) {
root.SetNewArray("k1").AddInteger(1).AddInteger(2).AddInteger(3)
assert.Equal(t, 3, root.GetArray("k1").Len())
assert.Equal(t, `{"k1":[1,2,3]}`, root.Marshal())
assert.Equal(t, "[0,0]0[1,1]1[2,1]2[3,1]3", root.GetArray("k1").StructureAsString())
assert.Equal(t, "[0,0]0[1,1]1[2,1]2[3,1]3", root.GetArray("k1").ToTestString())

root.GetArray("k1").Delete(1)
assert.Equal(t, `{"k1":[1,3]}`, root.Marshal())
assert.Equal(t, 2, root.GetArray("k1").Len())
assert.Equal(t, "[0,0]0[1,1]1[2,0]2[1,1]3", root.GetArray("k1").StructureAsString())
assert.Equal(t, "[0,0]0[1,1]1[2,0]2[1,1]3", root.GetArray("k1").ToTestString())

root.GetArray("k1").InsertIntegerAfter(0, 2)
assert.Equal(t, `{"k1":[1,2,3]}`, root.Marshal())
assert.Equal(t, 3, root.GetArray("k1").Len())
assert.Equal(t, "[0,0]0[1,1]1[3,1]2[1,0]2[1,1]3", root.GetArray("k1").StructureAsString())
assert.Equal(t, "[0,0]0[1,1]1[3,1]2[1,0]2[1,1]3", root.GetArray("k1").ToTestString())

root.GetArray("k1").InsertIntegerAfter(2, 4)
assert.Equal(t, `{"k1":[1,2,3,4]}`, root.Marshal())
assert.Equal(t, 4, root.GetArray("k1").Len())
assert.Equal(t, "[0,0]0[1,1]1[2,1]2[2,0]2[3,1]3[4,1]4", root.GetArray("k1").StructureAsString())
assert.Equal(t, "[0,0]0[1,1]1[2,1]2[2,0]2[3,1]3[4,1]4", root.GetArray("k1").ToTestString())

for i := 0; i < root.GetArray("k1").Len(); i++ {
assert.Equal(
Expand Down Expand Up @@ -216,23 +216,23 @@ func TestDocument(t *testing.T) {
text := root.GetText("k1")
assert.Equal(t,
`[0:0:00:0 {} ""][1:2:00:0 {} "A"][1:3:00:0 {} "12"]{1:2:00:1 {} "BC"}[1:2:00:3 {} "D"]`,
text.StructureAsString(),
text.ToTestString(),
)

from, _ := text.CreateRange(0, 0)
assert.Equal(t, "0:0:00:0:0", from.StructureAsString())
assert.Equal(t, "0:0:00:0:0", from.ToTestString())

from, _ = text.CreateRange(1, 1)
assert.Equal(t, "1:2:00:0:1", from.StructureAsString())
assert.Equal(t, "1:2:00:0:1", from.ToTestString())

from, _ = text.CreateRange(2, 2)
assert.Equal(t, "1:3:00:0:1", from.StructureAsString())
assert.Equal(t, "1:3:00:0:1", from.ToTestString())

from, _ = text.CreateRange(3, 3)
assert.Equal(t, "1:3:00:0:2", from.StructureAsString())
assert.Equal(t, "1:3:00:0:2", from.ToTestString())

from, _ = text.CreateRange(4, 4)
assert.Equal(t, "1:2:00:3:1", from.StructureAsString())
assert.Equal(t, "1:2:00:3:1", from.ToTestString())
return nil
})
assert.NoError(t, err)
Expand Down Expand Up @@ -265,7 +265,7 @@ func TestDocument(t *testing.T) {
assert.Equal(
t,
`[0:0:00:0 {} ""][1:2:00:0 {} "Hello world"]`,
text.StructureAsString(),
text.ToTestString(),
)
return nil
})
Expand All @@ -277,7 +277,7 @@ func TestDocument(t *testing.T) {
text.Style(0, 5, map[string]string{"b": "1"})
assert.Equal(t,
`[0:0:00:0 {} ""][1:2:00:0 {"b":"1"} "Hello"][1:2:00:5 {} " world"]`,
text.StructureAsString(),
text.ToTestString(),
)
return nil
})
Expand All @@ -294,14 +294,14 @@ func TestDocument(t *testing.T) {
assert.Equal(
t,
`[0:0:00:0 {} ""][1:2:00:0 {"b":"1"} "Hello"][1:2:00:5 {} " world"]`,
text.StructureAsString(),
text.ToTestString(),
)

text.Style(3, 5, map[string]string{"i": "1"})
assert.Equal(
t,
`[0:0:00:0 {} ""][1:2:00:0 {"b":"1"} "Hel"][1:2:00:3 {"b":"1","i":"1"} "lo"][1:2:00:5 {} " world"]`,
text.StructureAsString(),
text.ToTestString(),
)
return nil
})
Expand All @@ -319,7 +319,7 @@ func TestDocument(t *testing.T) {
t,
`[0:0:00:0 {} ""][1:2:00:0 {"b":"1"} "Hel"][1:2:00:3 {"b":"1","i":"1"} "lo"]`+
`[4:1:00:0 {} " Yorkie"]{1:2:00:5 {} " world"}`,
text.StructureAsString(),
text.ToTestString(),
)
return nil
})
Expand All @@ -337,7 +337,7 @@ func TestDocument(t *testing.T) {
t,
`[0:0:00:0 {} ""][1:2:00:0 {"b":"1"} "Hel"][1:2:00:3 {"b":"1","i":"1"} "lo"]`+
`[5:1:00:0 {"list":"true"} "\n"][4:1:00:0 {} " Yorkie"]{1:2:00:5 {} " world"}`,
text.StructureAsString(),
text.ToTestString(),
)
return nil
})
Expand Down Expand Up @@ -483,7 +483,7 @@ func TestDocument(t *testing.T) {
assert.Equal(
t,
`[0:0:00:0 {} ""][1:3:00:0 {} "12"]{1:2:00:0 {} "AB"}[1:2:00:2 {} "CD"]`,
doc.Root().GetText("text").StructureAsString(),
doc.Root().GetText("text").ToTestString(),
)

assert.Equal(t, 1, doc.GarbageLen())
Expand All @@ -492,7 +492,7 @@ func TestDocument(t *testing.T) {
assert.Equal(
t,
`[0:0:00:0 {} ""][1:3:00:0 {} "12"][1:2:00:2 {} "CD"]`,
doc.Root().GetText("text").StructureAsString(),
doc.Root().GetText("text").ToTestString(),
)

err = doc.Update(func(root *json.Object, p *presence.Presence) error {
Expand All @@ -503,7 +503,7 @@ func TestDocument(t *testing.T) {
assert.Equal(
t,
`[0:0:00:0 {} ""][1:3:00:0 {} "12"]{1:2:00:2 {} "CD"}`,
doc.Root().GetText("text").StructureAsString(),
doc.Root().GetText("text").ToTestString(),
)
})

Expand Down
4 changes: 2 additions & 2 deletions pkg/document/time/ticket.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ func NewTicket(
}
}

// StructureAsString returns a string containing the metadata of the ticket
// ToTestString returns a string containing the metadata of the ticket
// for debugging purpose.
func (t *Ticket) StructureAsString() string {
func (t *Ticket) ToTestString() string {
return fmt.Sprintf(
"%d:%d:%s", t.lamport, t.delimiter, t.actorID.String()[22:24],
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/document/time/ticket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestTicket(t *testing.T) {

assert.Equal(t, "0:1:"+ticket.ActorIDHex(), ticket.Key())
assert.Equal(t, "0:1:"+ticket.ActorIDHex()[22:24],
ticket.StructureAsString())
ticket.ToTestString())
})

t.Run("ticket comparing test", func(t *testing.T) {
Expand Down
Loading

1 comment on commit 12f3892

@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: 12f3892 Previous: 5849800 Ratio
BenchmarkDocument/constructor_test - ns/op 1717 ns/op 1817 ns/op 0.94
BenchmarkDocument/constructor_test - B/op 1240 B/op 1240 B/op 1
BenchmarkDocument/constructor_test - allocs/op 20 allocs/op 20 allocs/op 1
BenchmarkDocument/status_test - ns/op 1113 ns/op 1236 ns/op 0.90
BenchmarkDocument/status_test - B/op 1208 B/op 1208 B/op 1
BenchmarkDocument/status_test - allocs/op 18 allocs/op 18 allocs/op 1
BenchmarkDocument/equals_test - ns/op 9490 ns/op 9709 ns/op 0.98
BenchmarkDocument/equals_test - B/op 7008 B/op 7008 B/op 1
BenchmarkDocument/equals_test - allocs/op 119 allocs/op 119 allocs/op 1
BenchmarkDocument/nested_update_test - ns/op 21755 ns/op 22991 ns/op 0.95
BenchmarkDocument/nested_update_test - B/op 11993 B/op 11993 B/op 1
BenchmarkDocument/nested_update_test - allocs/op 253 allocs/op 253 allocs/op 1
BenchmarkDocument/delete_test - ns/op 36124 ns/op 31613 ns/op 1.14
BenchmarkDocument/delete_test - B/op 15218 B/op 15218 B/op 1
BenchmarkDocument/delete_test - allocs/op 332 allocs/op 332 allocs/op 1
BenchmarkDocument/object_test - ns/op 10605 ns/op 11309 ns/op 0.94
BenchmarkDocument/object_test - B/op 6753 B/op 6753 B/op 1
BenchmarkDocument/object_test - allocs/op 115 allocs/op 115 allocs/op 1
BenchmarkDocument/array_test - ns/op 35307 ns/op 36480 ns/op 0.97
BenchmarkDocument/array_test - B/op 11850 B/op 11850 B/op 1
BenchmarkDocument/array_test - allocs/op 269 allocs/op 269 allocs/op 1
BenchmarkDocument/text_test - ns/op 38930 ns/op 42882 ns/op 0.91
BenchmarkDocument/text_test - B/op 14922 B/op 14922 B/op 1
BenchmarkDocument/text_test - allocs/op 475 allocs/op 475 allocs/op 1
BenchmarkDocument/text_composition_test - ns/op 39140 ns/op 40242 ns/op 0.97
BenchmarkDocument/text_composition_test - B/op 18306 B/op 18306 B/op 1
BenchmarkDocument/text_composition_test - allocs/op 476 allocs/op 476 allocs/op 1
BenchmarkDocument/rich_text_test - ns/op 104985 ns/op 109865 ns/op 0.96
BenchmarkDocument/rich_text_test - B/op 38697 B/op 38695 B/op 1.00
BenchmarkDocument/rich_text_test - allocs/op 1154 allocs/op 1154 allocs/op 1
BenchmarkDocument/counter_test - ns/op 21499 ns/op 22643 ns/op 0.95
BenchmarkDocument/counter_test - B/op 10273 B/op 10275 B/op 1.00
BenchmarkDocument/counter_test - allocs/op 240 allocs/op 240 allocs/op 1
BenchmarkDocument/text_edit_gc_100 - ns/op 3955948 ns/op 4105663 ns/op 0.96
BenchmarkDocument/text_edit_gc_100 - B/op 1553267 B/op 1553642 B/op 1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op 17166 allocs/op 17167 allocs/op 1.00
BenchmarkDocument/text_edit_gc_1000 - ns/op 311454068 ns/op 325645157 ns/op 0.96
BenchmarkDocument/text_edit_gc_1000 - B/op 136648292 B/op 136637608 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 210785 allocs/op 210743 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 - ns/op 4507586 ns/op 4561579 ns/op 0.99
BenchmarkDocument/text_split_gc_100 - B/op 2218026 B/op 2218166 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 16596 allocs/op 16596 allocs/op 1
BenchmarkDocument/text_split_gc_1000 - ns/op 368976458 ns/op 372313017 ns/op 0.99
BenchmarkDocument/text_split_gc_1000 - B/op 214864317 B/op 214840418 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 211452 allocs/op 211371 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 - ns/op 18588045 ns/op 19071163 ns/op 0.97
BenchmarkDocument/text_delete_all_10000 - B/op 5903552 B/op 5903401 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 41123 allocs/op 41122 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 - ns/op 256780130 ns/op 271442449 ns/op 0.95
BenchmarkDocument/text_delete_all_100000 - B/op 53848304 B/op 53836328 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 416014 allocs/op 415966 allocs/op 1.00
BenchmarkDocument/text_100 - ns/op 317801 ns/op 339809 ns/op 0.94
BenchmarkDocument/text_100 - B/op 118517 B/op 118518 B/op 1.00
BenchmarkDocument/text_100 - allocs/op 5079 allocs/op 5079 allocs/op 1
BenchmarkDocument/text_1000 - ns/op 3475798 ns/op 3922777 ns/op 0.89
BenchmarkDocument/text_1000 - B/op 1153121 B/op 1153127 B/op 1.00
BenchmarkDocument/text_1000 - allocs/op 50083 allocs/op 50083 allocs/op 1
BenchmarkDocument/array_1000 - ns/op 1720006 ns/op 1903075 ns/op 0.90
BenchmarkDocument/array_1000 - B/op 1103028 B/op 1103003 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11872 allocs/op 11872 allocs/op 1
BenchmarkDocument/array_10000 - ns/op 19504165 ns/op 21486917 ns/op 0.91
BenchmarkDocument/array_10000 - B/op 9906622 B/op 9906774 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120721 allocs/op 120723 allocs/op 1.00
BenchmarkDocument/array_gc_100 - ns/op 179192 ns/op 204363 ns/op 0.88
BenchmarkDocument/array_gc_100 - B/op 98469 B/op 98465 B/op 1.00
BenchmarkDocument/array_gc_100 - allocs/op 1248 allocs/op 1248 allocs/op 1
BenchmarkDocument/array_gc_1000 - ns/op 2004363 ns/op 2157436 ns/op 0.93
BenchmarkDocument/array_gc_1000 - B/op 1170720 B/op 1170726 B/op 1.00
BenchmarkDocument/array_gc_1000 - allocs/op 12911 allocs/op 12911 allocs/op 1
BenchmarkDocument/counter_1000 - ns/op 285715 ns/op 329683 ns/op 0.87
BenchmarkDocument/counter_1000 - B/op 198838 B/op 198837 B/op 1.00
BenchmarkDocument/counter_1000 - allocs/op 6508 allocs/op 6508 allocs/op 1
BenchmarkDocument/counter_10000 - ns/op 3166283 ns/op 3582373 ns/op 0.88
BenchmarkDocument/counter_10000 - B/op 2165760 B/op 2165766 B/op 1.00
BenchmarkDocument/counter_10000 - allocs/op 69515 allocs/op 69515 allocs/op 1
BenchmarkDocument/object_1000 - ns/op 1918444 ns/op 2075247 ns/op 0.92
BenchmarkDocument/object_1000 - B/op 1451750 B/op 1451472 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9920 allocs/op 9919 allocs/op 1.00
BenchmarkDocument/object_10000 - ns/op 22249926 ns/op 24897261 ns/op 0.89
BenchmarkDocument/object_10000 - B/op 12367144 B/op 12370992 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 101218 allocs/op 101229 allocs/op 1.00
BenchmarkDocument/tree_100 - ns/op 982980 ns/op 1091184 ns/op 0.90
BenchmarkDocument/tree_100 - B/op 442925 B/op 442927 B/op 1.00
BenchmarkDocument/tree_100 - allocs/op 4505 allocs/op 4505 allocs/op 1
BenchmarkDocument/tree_1000 - ns/op 66441209 ns/op 71335889 ns/op 0.93
BenchmarkDocument/tree_1000 - B/op 35223100 B/op 35222282 B/op 1.00
BenchmarkDocument/tree_1000 - allocs/op 44117 allocs/op 44117 allocs/op 1
BenchmarkDocument/tree_10000 - ns/op 8823372947 ns/op 10356920105 ns/op 0.85
BenchmarkDocument/tree_10000 - B/op 3438881472 B/op 3438899712 B/op 1.00
BenchmarkDocument/tree_10000 - allocs/op 440150 allocs/op 440165 allocs/op 1.00
BenchmarkDocument/tree_delete_all_1000 - ns/op 68297492 ns/op 74477646 ns/op 0.92
BenchmarkDocument/tree_delete_all_1000 - B/op 35692138 B/op 35692702 B/op 1.00
BenchmarkDocument/tree_delete_all_1000 - allocs/op 51769 allocs/op 51769 allocs/op 1
BenchmarkDocument/tree_edit_gc_100 - ns/op 3563487 ns/op 3735041 ns/op 0.95
BenchmarkDocument/tree_edit_gc_100 - B/op 2077449 B/op 2077512 B/op 1.00
BenchmarkDocument/tree_edit_gc_100 - allocs/op 11164 allocs/op 11164 allocs/op 1
BenchmarkDocument/tree_edit_gc_1000 - ns/op 262456187 ns/op 282702013 ns/op 0.93
BenchmarkDocument/tree_edit_gc_1000 - B/op 180290566 B/op 180293780 B/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 113372 allocs/op 113382 allocs/op 1.00
BenchmarkDocument/tree_split_gc_100 - ns/op 2481305 ns/op 2520332 ns/op 0.98
BenchmarkDocument/tree_split_gc_100 - B/op 1347869 B/op 1347884 B/op 1.00
BenchmarkDocument/tree_split_gc_100 - allocs/op 9060 allocs/op 9060 allocs/op 1
BenchmarkDocument/tree_split_gc_1000 - ns/op 161331076 ns/op 166667491 ns/op 0.97
BenchmarkDocument/tree_split_gc_1000 - B/op 113955505 B/op 113957106 B/op 1.00
BenchmarkDocument/tree_split_gc_1000 - allocs/op 93868 allocs/op 93871 allocs/op 1.00
BenchmarkRPC/client_to_server - ns/op 414111849 ns/op 453707387 ns/op 0.91
BenchmarkRPC/client_to_server - B/op 12325938 B/op 12285573 B/op 1.00
BenchmarkRPC/client_to_server - allocs/op 178401 allocs/op 178180 allocs/op 1.00
BenchmarkRPC/client_to_client_via_server - ns/op 696877778 ns/op 789500955 ns/op 0.88
BenchmarkRPC/client_to_client_via_server - B/op 22767980 B/op 22744392 B/op 1.00
BenchmarkRPC/client_to_client_via_server - allocs/op 333480 allocs/op 333456 allocs/op 1.00
BenchmarkRPC/attach_large_document - ns/op 1397941337 ns/op 1492349178 ns/op 0.94
BenchmarkRPC/attach_large_document - B/op 1799088728 B/op 1821099400 B/op 0.99
BenchmarkRPC/attach_large_document - allocs/op 9816 allocs/op 9888 allocs/op 0.99
BenchmarkRPC/adminCli_to_server - ns/op 589391984 ns/op 639740974 ns/op 0.92
BenchmarkRPC/adminCli_to_server - B/op 20205036 B/op 20196968 B/op 1.00
BenchmarkRPC/adminCli_to_server - allocs/op 324147 allocs/op 324166 allocs/op 1.00
BenchmarkLocker - ns/op 127.9 ns/op 124 ns/op 1.03
BenchmarkLocker - B/op 16 B/op 16 B/op 1
BenchmarkLocker - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkLockerParallel - ns/op 159.5 ns/op 154.4 ns/op 1.03
BenchmarkLockerParallel - B/op 0 B/op 0 B/op NaN
BenchmarkLockerParallel - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkLockerMoreKeys - ns/op 320.3 ns/op 428.2 ns/op 0.75
BenchmarkLockerMoreKeys - B/op 14 B/op 13 B/op 1.08
BenchmarkLockerMoreKeys - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkSync/memory_sync_10_test - ns/op 7409 ns/op 8193 ns/op 0.90
BenchmarkSync/memory_sync_10_test - B/op 1283 B/op 1281 B/op 1.00
BenchmarkSync/memory_sync_10_test - allocs/op 38 allocs/op 38 allocs/op 1
BenchmarkSync/memory_sync_100_test - ns/op 68255 ns/op 75156 ns/op 0.91
BenchmarkSync/memory_sync_100_test - B/op 8734 B/op 8596 B/op 1.02
BenchmarkSync/memory_sync_100_test - allocs/op 279 allocs/op 270 allocs/op 1.03
BenchmarkSync/memory_sync_1000_test - ns/op 674116 ns/op 742736 ns/op 0.91
BenchmarkSync/memory_sync_1000_test - B/op 81893 B/op 81427 B/op 1.01
BenchmarkSync/memory_sync_1000_test - allocs/op 2593 allocs/op 2561 allocs/op 1.01
BenchmarkSync/memory_sync_10000_test - ns/op 7081547 ns/op 7631395 ns/op 0.93
BenchmarkSync/memory_sync_10000_test - B/op 856912 B/op 850311 B/op 1.01
BenchmarkSync/memory_sync_10000_test - allocs/op 26949 allocs/op 26931 allocs/op 1.00
BenchmarkTextEditing - ns/op 26671345273 ns/op 29009982871 ns/op 0.92
BenchmarkTextEditing - B/op 8456456448 B/op 8456518720 B/op 1.00
BenchmarkTextEditing - allocs/op 20613653 allocs/op 20613875 allocs/op 1.00

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

Please sign in to comment.