Skip to content

Commit

Permalink
Add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
sejongk committed Nov 30, 2023
1 parent 25565a8 commit 11350c6
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 46 deletions.
5 changes: 4 additions & 1 deletion api/types/resource_ref_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ import (
"github.com/yorkie-team/yorkie/pkg/document/key"
)

// ErrInvalidDocRefKeySetInput is returned when the input of DocRefKey Set is invalid.
var ErrInvalidDocRefKeySetInput = errors.New("use the format 'docKey,docID' for the input")

// DocRefKey represents an identifier used to reference a document.
type DocRefKey struct {
Key key.Key
Expand All @@ -40,7 +43,7 @@ func (r *DocRefKey) String() string {
func (r *DocRefKey) Set(v string) error {
parsed := strings.Split(v, ",")
if len(parsed) != 2 {
return errors.New("use the format 'docKey,docID' for the input")
return ErrInvalidDocRefKeySetInput
}
r.Key = key.Key(parsed[0])
r.ID = ID(parsed[1])
Expand Down
45 changes: 45 additions & 0 deletions api/types/resource_ref_key_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright 2023 The Yorkie Authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package types_test

import (
"fmt"
"testing"

"github.com/stretchr/testify/assert"

"github.com/yorkie-team/yorkie/api/types"
"github.com/yorkie-team/yorkie/pkg/document/key"
)

func TestResourceRefKey(t *testing.T) {
t.Run("DocRefKey Set test", func(t *testing.T) {
docKey := key.Key("docKey")
docID := types.ID("docID")
docRef := types.DocRefKey{}

// 01. Give an invalid input to Set.
err := docRef.Set("abc")
assert.ErrorIs(t, err, types.ErrInvalidDocRefKeySetInput)

// 02. Give a valid input to Set.
err = docRef.Set(fmt.Sprintf("%s,%s", docKey, docID))
assert.NoError(t, err)
assert.Equal(t, docRef.Key, docKey)
assert.Equal(t, docRef.ID, docID)
})
}
93 changes: 48 additions & 45 deletions server/backend/database/mongo/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,56 +48,59 @@ func NewRegistryBuilder() *bsoncodec.RegistryBuilder {
// containing a number of `doc_key`.`doc_id`.{`client_seq`, `server_seq`, `status`}s.
rb.RegisterTypeDecoder(
reflect.TypeOf(make(database.ClientDocInfoMap)),
bsoncodec.ValueDecoderFunc(func(_ bsoncodec.DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error {
docs, err := vr.ReadDocument()
if err != nil {
return fmt.Errorf("read documents: %w", err)
}
if val.IsNil() {
val.Set(reflect.MakeMap(val.Type()))
}
bsoncodec.ValueDecoderFunc(clientDocumentsDecoder),
)

for {
docKey, docInfoByDocIDMapReader, err := docs.ReadElement()
if err != nil {
if err == bsonrw.ErrEOD {
break
}
return fmt.Errorf("read the element in documents: %w", err)
}
docInfoByDocIDMap, err := docInfoByDocIDMapReader.ReadDocument()
if err != nil {
return fmt.Errorf("read docInfoByDocID: %w", err)
}
for {
docID, docInfoReader, err := docInfoByDocIDMap.ReadElement()
if err != nil {
if err == bsonrw.ErrEOD {
break
}
return fmt.Errorf("read the element in docInfoByDocID: %w", err)
}
return rb
}

docInfo := &database.ClientDocInfo{}
docInfoDecoder, err := bson.NewDecoder(docInfoReader)
if err != nil {
return fmt.Errorf("create docInfoDecoder: %w", err)
}
err = docInfoDecoder.Decode(docInfo)
if err != nil {
return fmt.Errorf("decode docInfo: %w", err)
}
func clientDocumentsDecoder(_ bsoncodec.DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error {
docs, err := vr.ReadDocument()
if err != nil {
return fmt.Errorf("read documents: %w", err)
}
if val.IsNil() {
val.Set(reflect.MakeMap(val.Type()))
}

docRef := reflect.ValueOf(types.DocRefKey{
Key: key.Key(docKey),
ID: types.ID(docID),
})
val.SetMapIndex(docRef, reflect.ValueOf(docInfo))
for {
docKey, docInfoByDocIDMapReader, err := docs.ReadElement()
if err != nil {
if err == bsonrw.ErrEOD {
break
}
return fmt.Errorf("read the element in documents: %w", err)
}
docInfoByDocIDMap, err := docInfoByDocIDMapReader.ReadDocument()
if err != nil {
return fmt.Errorf("read docInfoByDocID: %w", err)
}
for {
docID, docInfoReader, err := docInfoByDocIDMap.ReadElement()
if err != nil {
if err == bsonrw.ErrEOD {
break
}
return fmt.Errorf("read the element in docInfoByDocID: %w", err)
}

docInfo := &database.ClientDocInfo{}
docInfoDecoder, err := bson.NewDecoder(docInfoReader)
if err != nil {
return fmt.Errorf("create docInfoDecoder: %w", err)
}
err = docInfoDecoder.Decode(docInfo)
if err != nil {
return fmt.Errorf("decode docInfo: %w", err)
}

return nil
}))
docRef := reflect.ValueOf(types.DocRefKey{
Key: key.Key(docKey),
ID: types.ID(docID),
})
val.SetMapIndex(docRef, reflect.ValueOf(docInfo))
}
}

return rb
return nil
}
64 changes: 64 additions & 0 deletions server/backend/database/mongo/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@
package mongo

import (
"reflect"
"testing"

"github.com/stretchr/testify/assert"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/bsoncodec"
"go.mongodb.org/mongo-driver/bson/bsonrw"
"go.mongodb.org/mongo-driver/bson/primitive"

"github.com/yorkie-team/yorkie/api/types"
"github.com/yorkie-team/yorkie/pkg/document/key"
"github.com/yorkie-team/yorkie/server/backend/database"
)

Expand All @@ -41,3 +45,63 @@ func TestRegistry(t *testing.T) {
assert.Equal(t, id, info.ID)

}

func TestDecoder(t *testing.T) {
t.Run("clientDocumentsDecoder test", func(t *testing.T) {
docs := []struct {
docRefKey types.DocRefKey
docInfo database.ClientDocInfo
}{
{
docRefKey: types.DocRefKey{
Key: key.Key("test-doc-key1"),
ID: types.ID("test-doc-id1"),
},
docInfo: database.ClientDocInfo{
ClientSeq: 0,
ServerSeq: 0,
Status: database.DocumentAttached,
},
},
{
docRefKey: types.DocRefKey{
Key: key.Key("test-doc-key2"),
ID: types.ID("test-doc-id2"),
},
docInfo: database.ClientDocInfo{
ClientSeq: 0,
ServerSeq: 0,
Status: database.DocumentDetached,
},
},
}

bsonDocs := make(bson.M)
for _, doc := range docs {
bsonDocs[doc.docRefKey.Key.String()] = bson.M{
doc.docRefKey.ID.String(): bson.M{
"client_seq": doc.docInfo.ClientSeq,
"server_seq": doc.docInfo.ServerSeq,
"status": doc.docInfo.Status,
},
}
}

marshaledDocs, err := bson.Marshal(bsonDocs)
assert.NoError(t, err)

clientDocInfoMap := make(database.ClientDocInfoMap)
err = clientDocumentsDecoder(
bsoncodec.DecodeContext{},
bsonrw.NewBSONDocumentReader(marshaledDocs),
reflect.ValueOf(clientDocInfoMap),
)
assert.NoError(t, err)
assert.Len(t, clientDocInfoMap, len(docs))
for _, doc := range docs {
assert.Equal(t, doc.docInfo.ClientSeq, clientDocInfoMap[doc.docRefKey].ClientSeq)
assert.Equal(t, doc.docInfo.ServerSeq, clientDocInfoMap[doc.docRefKey].ServerSeq)
assert.Equal(t, doc.docInfo.Status, clientDocInfoMap[doc.docRefKey].Status)
}
})
}

1 comment on commit 11350c6

@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: 11350c6 Previous: 3acd623 Ratio
BenchmarkDocument/constructor_test - ns/op 1342 ns/op 1356 ns/op 0.99
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 761.2 ns/op 786.3 ns/op 0.97
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 6996 ns/op 7138 ns/op 0.98
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 15954 ns/op 16201 ns/op 0.98
BenchmarkDocument/nested_update_test - B/op 11962 B/op 11962 B/op 1
BenchmarkDocument/nested_update_test - allocs/op 254 allocs/op 254 allocs/op 1
BenchmarkDocument/delete_test - ns/op 24647 ns/op 22198 ns/op 1.11
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 8283 ns/op 10199 ns/op 0.81
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 29088 ns/op 29641 ns/op 0.98
BenchmarkDocument/array_test - B/op 11818 B/op 11819 B/op 1.00
BenchmarkDocument/array_test - allocs/op 270 allocs/op 270 allocs/op 1
BenchmarkDocument/text_test - ns/op 30915 ns/op 31320 ns/op 0.99
BenchmarkDocument/text_test - B/op 14797 B/op 14795 B/op 1.00
BenchmarkDocument/text_test - allocs/op 468 allocs/op 468 allocs/op 1
BenchmarkDocument/text_composition_test - ns/op 28255 ns/op 29237 ns/op 0.97
BenchmarkDocument/text_composition_test - B/op 18276 B/op 18278 B/op 1.00
BenchmarkDocument/text_composition_test - allocs/op 477 allocs/op 477 allocs/op 1
BenchmarkDocument/rich_text_test - ns/op 80829 ns/op 82849 ns/op 0.98
BenchmarkDocument/rich_text_test - B/op 38540 B/op 38540 B/op 1
BenchmarkDocument/rich_text_test - allocs/op 1147 allocs/op 1147 allocs/op 1
BenchmarkDocument/counter_test - ns/op 16511 ns/op 16861 ns/op 0.98
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 2895082 ns/op 2985130 ns/op 0.97
BenchmarkDocument/text_edit_gc_100 - B/op 1655200 B/op 1655239 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 230338842 ns/op 234174280 ns/op 0.98
BenchmarkDocument/text_edit_gc_1000 - B/op 144362084 B/op 144368132 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 200987 allocs/op 201011 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 - ns/op 3369280 ns/op 3436736 ns/op 0.98
BenchmarkDocument/text_split_gc_100 - B/op 2313472 B/op 2313433 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 16193 allocs/op 16193 allocs/op 1
BenchmarkDocument/text_split_gc_1000 - ns/op 283955432 ns/op 292485836 ns/op 0.97
BenchmarkDocument/text_split_gc_1000 - B/op 228903100 B/op 228890592 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 204006 allocs/op 203938 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 - ns/op 10474541 ns/op 11958204 ns/op 0.88
BenchmarkDocument/text_delete_all_10000 - B/op 5810436 B/op 5811760 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 40674 allocs/op 40681 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 - ns/op 186364327 ns/op 192054829 ns/op 0.97
BenchmarkDocument/text_delete_all_100000 - B/op 81906656 B/op 81904042 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 411636 allocs/op 411636 allocs/op 1
BenchmarkDocument/text_100 - ns/op 220250 ns/op 233920 ns/op 0.94
BenchmarkDocument/text_100 - B/op 118483 B/op 118483 B/op 1
BenchmarkDocument/text_100 - allocs/op 5080 allocs/op 5080 allocs/op 1
BenchmarkDocument/text_1000 - ns/op 2385021 ns/op 2472786 ns/op 0.96
BenchmarkDocument/text_1000 - B/op 1153070 B/op 1153071 B/op 1.00
BenchmarkDocument/text_1000 - allocs/op 50084 allocs/op 50084 allocs/op 1
BenchmarkDocument/array_1000 - ns/op 1199187 ns/op 1226516 ns/op 0.98
BenchmarkDocument/array_1000 - B/op 1091314 B/op 1091288 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11826 allocs/op 11826 allocs/op 1
BenchmarkDocument/array_10000 - ns/op 12820982 ns/op 13448793 ns/op 0.95
BenchmarkDocument/array_10000 - B/op 9799948 B/op 9798818 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120291 allocs/op 120286 allocs/op 1.00
BenchmarkDocument/array_gc_100 - ns/op 148027 ns/op 153630 ns/op 0.96
BenchmarkDocument/array_gc_100 - B/op 132481 B/op 132479 B/op 1.00
BenchmarkDocument/array_gc_100 - allocs/op 1248 allocs/op 1248 allocs/op 1
BenchmarkDocument/array_gc_1000 - ns/op 1377002 ns/op 1430382 ns/op 0.96
BenchmarkDocument/array_gc_1000 - B/op 1158902 B/op 1158905 B/op 1.00
BenchmarkDocument/array_gc_1000 - allocs/op 12864 allocs/op 12864 allocs/op 1
BenchmarkDocument/counter_1000 - ns/op 203107 ns/op 212571 ns/op 0.96
BenchmarkDocument/counter_1000 - B/op 192854 B/op 192851 B/op 1.00
BenchmarkDocument/counter_1000 - allocs/op 5765 allocs/op 5765 allocs/op 1
BenchmarkDocument/counter_10000 - ns/op 2191169 ns/op 2224184 ns/op 0.99
BenchmarkDocument/counter_10000 - B/op 2087782 B/op 2087765 B/op 1.00
BenchmarkDocument/counter_10000 - allocs/op 59772 allocs/op 59772 allocs/op 1
BenchmarkDocument/object_1000 - ns/op 1345614 ns/op 1424367 ns/op 0.94
BenchmarkDocument/object_1000 - B/op 1427938 B/op 1428068 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9845 allocs/op 9845 allocs/op 1
BenchmarkDocument/object_10000 - ns/op 14374897 ns/op 14642658 ns/op 0.98
BenchmarkDocument/object_10000 - B/op 12167341 B/op 12167843 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 100563 allocs/op 100562 allocs/op 1.00
BenchmarkDocument/tree_100 - ns/op 727544 ns/op 744469 ns/op 0.98
BenchmarkDocument/tree_100 - B/op 442889 B/op 442890 B/op 1.00
BenchmarkDocument/tree_100 - allocs/op 4506 allocs/op 4506 allocs/op 1
BenchmarkDocument/tree_1000 - ns/op 50339337 ns/op 50380066 ns/op 1.00
BenchmarkDocument/tree_1000 - B/op 35222162 B/op 35222527 B/op 1.00
BenchmarkDocument/tree_1000 - allocs/op 44118 allocs/op 44118 allocs/op 1
BenchmarkDocument/tree_10000 - ns/op 6337627467 ns/op 6537517333 ns/op 0.97
BenchmarkDocument/tree_10000 - B/op 3438874256 B/op 3438881024 B/op 1.00
BenchmarkDocument/tree_10000 - allocs/op 440203 allocs/op 440197 allocs/op 1.00
BenchmarkDocument/tree_delete_all_1000 - ns/op 51660324 ns/op 50383873 ns/op 1.03
BenchmarkDocument/tree_delete_all_1000 - B/op 35687984 B/op 35686781 B/op 1.00
BenchmarkDocument/tree_delete_all_1000 - allocs/op 51746 allocs/op 51744 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_100 - ns/op 2726514 ns/op 2640190 ns/op 1.03
BenchmarkDocument/tree_edit_gc_100 - B/op 2099496 B/op 2100192 B/op 1.00
BenchmarkDocument/tree_edit_gc_100 - allocs/op 11165 allocs/op 11165 allocs/op 1
BenchmarkDocument/tree_edit_gc_1000 - ns/op 198299943 ns/op 203482588 ns/op 0.97
BenchmarkDocument/tree_edit_gc_1000 - B/op 180344660 B/op 180290254 B/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 113340 allocs/op 113352 allocs/op 1.00
BenchmarkDocument/tree_split_gc_100 - ns/op 1914138 ns/op 1956842 ns/op 0.98
BenchmarkDocument/tree_split_gc_100 - B/op 1363441 B/op 1363460 B/op 1.00
BenchmarkDocument/tree_split_gc_100 - allocs/op 8735 allocs/op 8735 allocs/op 1
BenchmarkDocument/tree_split_gc_1000 - ns/op 129186380 ns/op 135715287 ns/op 0.95
BenchmarkDocument/tree_split_gc_1000 - B/op 120284110 B/op 120284779 B/op 1.00
BenchmarkDocument/tree_split_gc_1000 - allocs/op 96185 allocs/op 96190 allocs/op 1.00
BenchmarkRPC/client_to_server - ns/op 363158392 ns/op 359703488 ns/op 1.01
BenchmarkRPC/client_to_server - B/op 12491312 B/op 12458544 B/op 1.00
BenchmarkRPC/client_to_server - allocs/op 178516 allocs/op 176321 allocs/op 1.01
BenchmarkRPC/client_to_client_via_server - ns/op 614007609 ns/op 603988013 ns/op 1.02
BenchmarkRPC/client_to_client_via_server - B/op 23090792 B/op 23259432 B/op 0.99
BenchmarkRPC/client_to_client_via_server - allocs/op 334602 allocs/op 331024 allocs/op 1.01
BenchmarkRPC/attach_large_document - ns/op 1304616866 ns/op 1381620656 ns/op 0.94
BenchmarkRPC/attach_large_document - B/op 1844556352 B/op 1820736296 B/op 1.01
BenchmarkRPC/attach_large_document - allocs/op 10702 allocs/op 10374 allocs/op 1.03
BenchmarkRPC/adminCli_to_server - ns/op 504120844 ns/op 506711988 ns/op 0.99
BenchmarkRPC/adminCli_to_server - B/op 20210692 B/op 20155856 B/op 1.00
BenchmarkRPC/adminCli_to_server - allocs/op 320732 allocs/op 317226 allocs/op 1.01
BenchmarkLocker - ns/op 69.8 ns/op 67.15 ns/op 1.04
BenchmarkLocker - B/op 16 B/op 16 B/op 1
BenchmarkLocker - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkLockerParallel - ns/op 38.82 ns/op 41.59 ns/op 0.93
BenchmarkLockerParallel - B/op 0 B/op 0 B/op NaN
BenchmarkLockerParallel - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkLockerMoreKeys - ns/op 154.6 ns/op 160.5 ns/op 0.96
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 4141815 ns/op 4228009 ns/op 0.98
BenchmarkChange/Push_10_Changes - B/op 147512 B/op 147011 B/op 1.00
BenchmarkChange/Push_10_Changes - allocs/op 1315 allocs/op 1305 allocs/op 1.01
BenchmarkChange/Push_100_Changes - ns/op 15521441 ns/op 15569560 ns/op 1.00
BenchmarkChange/Push_100_Changes - B/op 709135 B/op 714288 B/op 0.99
BenchmarkChange/Push_100_Changes - allocs/op 6866 allocs/op 6857 allocs/op 1.00
BenchmarkChange/Push_1000_Changes - ns/op 122473273 ns/op 122971913 ns/op 1.00
BenchmarkChange/Push_1000_Changes - B/op 6043198 B/op 6319134 B/op 0.96
BenchmarkChange/Push_1000_Changes - allocs/op 64371 allocs/op 64364 allocs/op 1.00
BenchmarkChange/Pull_10_Changes - ns/op 3201017 ns/op 3266944 ns/op 0.98
BenchmarkChange/Pull_10_Changes - B/op 123887 B/op 123436 B/op 1.00
BenchmarkChange/Pull_10_Changes - allocs/op 1015 allocs/op 1006 allocs/op 1.01
BenchmarkChange/Pull_100_Changes - ns/op 5045546 ns/op 5267253 ns/op 0.96
BenchmarkChange/Pull_100_Changes - B/op 327166 B/op 325367 B/op 1.01
BenchmarkChange/Pull_100_Changes - allocs/op 3486 allocs/op 3475 allocs/op 1.00
BenchmarkChange/Pull_1000_Changes - ns/op 9614317 ns/op 10054426 ns/op 0.96
BenchmarkChange/Pull_1000_Changes - B/op 1639942 B/op 1636062 B/op 1.00
BenchmarkChange/Pull_1000_Changes - allocs/op 29857 allocs/op 29837 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - ns/op 19196260 ns/op 19612724 ns/op 0.98
BenchmarkSnapshot/Push_3KB_snapshot - B/op 952061 B/op 947220 B/op 1.01
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op 6873 allocs/op 6862 allocs/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - ns/op 127380985 ns/op 128964020 ns/op 0.99
BenchmarkSnapshot/Push_30KB_snapshot - B/op 6222710 B/op 6446989 B/op 0.97
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op 64182 allocs/op 64177 allocs/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op 7563868 ns/op 7629068 ns/op 0.99
BenchmarkSnapshot/Pull_3KB_snapshot - B/op 1017347 B/op 1013744 B/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op 15508 allocs/op 15499 allocs/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op 16500720 ns/op 16093336 ns/op 1.03
BenchmarkSnapshot/Pull_30KB_snapshot - B/op 7335702 B/op 7331584 B/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op 150124 allocs/op 150113 allocs/op 1.00
BenchmarkSync/memory_sync_10_test - ns/op 8350 ns/op 7126 ns/op 1.17
BenchmarkSync/memory_sync_10_test - B/op 1287 B/op 1286 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 52509 ns/op 55219 ns/op 0.95
BenchmarkSync/memory_sync_100_test - B/op 8651 B/op 8990 B/op 0.96
BenchmarkSync/memory_sync_100_test - allocs/op 273 allocs/op 295 allocs/op 0.93
BenchmarkSync/memory_sync_1000_test - ns/op 583911 ns/op 440383 ns/op 1.33
BenchmarkSync/memory_sync_1000_test - B/op 74603 B/op 83572 B/op 0.89
BenchmarkSync/memory_sync_1000_test - allocs/op 2126 allocs/op 2682 allocs/op 0.79
BenchmarkSync/memory_sync_10000_test - ns/op 7157587 ns/op 4564967 ns/op 1.57
BenchmarkSync/memory_sync_10000_test - B/op 753352 B/op 818933 B/op 0.92
BenchmarkSync/memory_sync_10000_test - allocs/op 20451 allocs/op 24458 allocs/op 0.84
BenchmarkTextEditing - ns/op 18552338406 ns/op 19066495451 ns/op 0.97
BenchmarkTextEditing - B/op 9037758432 B/op 9038245440 B/op 1.00
BenchmarkTextEditing - allocs/op 19922299 allocs/op 19924611 allocs/op 1.00

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

Please sign in to comment.