Skip to content

Commit

Permalink
Introduce types DocRefKey and ClientRefKey
Browse files Browse the repository at this point in the history
  • Loading branch information
sejongk committed Nov 29, 2023
1 parent 5b9e445 commit f426bce
Show file tree
Hide file tree
Showing 23 changed files with 999 additions and 689 deletions.
3 changes: 1 addition & 2 deletions admin/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
api "github.com/yorkie-team/yorkie/api/yorkie/v1"
"github.com/yorkie-team/yorkie/pkg/document"
"github.com/yorkie-team/yorkie/pkg/document/key"
"github.com/yorkie-team/yorkie/server/backend/database"
)

// Option configures Options.
Expand Down Expand Up @@ -249,7 +248,7 @@ func (c *Client) UpdateProject(
func (c *Client) ListDocuments(
ctx context.Context,
projectName string,
previousOffset database.DocOffset,
previousOffset types.DocRefKey,
pageSize int32,
isForward bool,
includeSnapshot bool,
Expand Down
64 changes: 64 additions & 0 deletions api/types/resource_ref_key.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* 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

import (
"errors"
"fmt"
"strings"

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

// DocRefKey represents an identifier used to reference a document.
type DocRefKey struct {
Key key.Key
ID ID
}

// String returns the string representation of the given DocRefKey.
func (r *DocRefKey) String() string {
return fmt.Sprintf("Doc (%s.%s)", r.Key, r.ID)
}

// Set parses the given string (format: `docKey},{docID}`) and assigns the values
// to the given DocRefKey.
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")
}
r.Key = key.Key(parsed[0])
r.ID = ID(parsed[1])
return nil
}

// Type returns the type string of the given DocRefKey, used in cli help text.
func (r *DocRefKey) Type() string {
return "DocumentRefKey"
}

// ClientRefKey represents an identifier used to reference a client.
type ClientRefKey struct {
Key string
ID ID
}

// String returns the string representation of the given ClientRefKey.
func (r *ClientRefKey) String() string {
return fmt.Sprintf("Client (%s.%s)", r.Key, r.ID)
}
4 changes: 2 additions & 2 deletions cmd/yorkie/document/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ import (
"github.com/spf13/viper"

"github.com/yorkie-team/yorkie/admin"
"github.com/yorkie-team/yorkie/api/types"
"github.com/yorkie-team/yorkie/cmd/yorkie/config"
"github.com/yorkie-team/yorkie/pkg/units"
"github.com/yorkie-team/yorkie/server/backend/database"
)

var (
previousOffset database.DocOffset
previousOffset types.DocRefKey
pageSize int32
isForward bool
)
Expand Down
109 changes: 48 additions & 61 deletions server/backend/database/client_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (

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

// Below are the errors may occur depending on the document and client status.
Expand Down Expand Up @@ -55,6 +54,9 @@ type ClientDocInfo struct {
ClientSeq uint32 `bson:"client_seq"`
}

// ClientDocInfoMap is a map that associates DocRefKey with ClientDocInfo instances.
type ClientDocInfoMap map[types.DocRefKey]*ClientDocInfo

// ClientInfo is a structure representing information of a client.
type ClientInfo struct {
// ID is the unique ID of the client.
Expand All @@ -70,7 +72,7 @@ type ClientInfo struct {
Status string `bson:"status"`

// Documents is a map of document which is attached to the client.
Documents map[key.Key]map[types.ID]*ClientDocInfo `bson:"documents"`
Documents ClientDocInfoMap `bson:"documents"`

// CreatedAt is the time when the client was created.
CreatedAt time.Time `bson:"created_at"`
Expand Down Expand Up @@ -102,26 +104,22 @@ func (i *ClientInfo) Deactivate() {
}

// AttachDocument attaches the given document to this client.
func (i *ClientInfo) AttachDocument(docKey key.Key, docID types.ID) error {
func (i *ClientInfo) AttachDocument(docRef types.DocRefKey) error {
if i.Status != ClientActivated {
return fmt.Errorf("client(%s) attaches document(%s.%s): %w",
i.ID.String(), docKey.String(), docID.String(), ErrClientNotActivated)
return fmt.Errorf("client(%s) attaches %s: %w",
i.ID.String(), docRef, ErrClientNotActivated)
}

if i.Documents == nil {
i.Documents = make(map[key.Key]map[types.ID]*ClientDocInfo)
}

if i.Documents[docKey] == nil {
i.Documents[docKey] = make(map[types.ID]*ClientDocInfo)
i.Documents = make(map[types.DocRefKey]*ClientDocInfo)
}

if i.hasDocument(docKey, docID) && i.Documents[docKey][docID].Status == DocumentAttached {
return fmt.Errorf("client(%s) attaches document(%s.%s): %w",
i.ID.String(), docKey.String(), docID.String(), ErrDocumentAlreadyAttached)
if i.hasDocument(docRef) && i.Documents[docRef].Status == DocumentAttached {
return fmt.Errorf("client(%s) attaches %s: %w",
i.ID.String(), docRef, ErrDocumentAlreadyAttached)
}

i.Documents[docKey][docID] = &ClientDocInfo{
i.Documents[docRef] = &ClientDocInfo{
Status: DocumentAttached,
ServerSeq: 0,
ClientSeq: 0,
Expand All @@ -132,46 +130,46 @@ func (i *ClientInfo) AttachDocument(docKey key.Key, docID types.ID) error {
}

// DetachDocument detaches the given document from this client.
func (i *ClientInfo) DetachDocument(docKey key.Key, docID types.ID) error {
if err := i.EnsureDocumentAttached(docKey, docID); err != nil {
func (i *ClientInfo) DetachDocument(docRef types.DocRefKey) error {
if err := i.EnsureDocumentAttached(docRef); err != nil {
return err
}

i.Documents[docKey][docID].Status = DocumentDetached
i.Documents[docKey][docID].ClientSeq = 0
i.Documents[docKey][docID].ServerSeq = 0
i.Documents[docRef].Status = DocumentDetached
i.Documents[docRef].ClientSeq = 0
i.Documents[docRef].ServerSeq = 0
i.UpdatedAt = time.Now()

return nil
}

// RemoveDocument removes the given document from this client.
func (i *ClientInfo) RemoveDocument(docKey key.Key, docID types.ID) error {
if err := i.EnsureDocumentAttached(docKey, docID); err != nil {
func (i *ClientInfo) RemoveDocument(docRef types.DocRefKey) error {
if err := i.EnsureDocumentAttached(docRef); err != nil {
return err
}

i.Documents[docKey][docID].Status = DocumentRemoved
i.Documents[docKey][docID].ClientSeq = 0
i.Documents[docKey][docID].ServerSeq = 0
i.Documents[docRef].Status = DocumentRemoved
i.Documents[docRef].ClientSeq = 0
i.Documents[docRef].ServerSeq = 0
i.UpdatedAt = time.Now()

return nil
}

// IsAttached returns whether the given document is attached to this client.
func (i *ClientInfo) IsAttached(docKey key.Key, docID types.ID) (bool, error) {
if !i.hasDocument(docKey, docID) {
return false, fmt.Errorf("check document(%s.%s) is attached: %w",
docKey.String(), docID.String(), ErrDocumentNeverAttached)
func (i *ClientInfo) IsAttached(docRef types.DocRefKey) (bool, error) {
if !i.hasDocument(docRef) {
return false, fmt.Errorf("check %s is attached: %w",
docRef, ErrDocumentNeverAttached)
}

return i.Documents[docKey][docID].Status == DocumentAttached, nil
return i.Documents[docRef].Status == DocumentAttached, nil
}

// Checkpoint returns the checkpoint of the given document.
func (i *ClientInfo) Checkpoint(docKey key.Key, docID types.ID) change.Checkpoint {
clientDocInfo := i.Documents[docKey][docID]
func (i *ClientInfo) Checkpoint(docRef types.DocRefKey) change.Checkpoint {
clientDocInfo := i.Documents[docRef]
if clientDocInfo == nil {
return change.InitialCheckpoint
}
Expand All @@ -181,38 +179,30 @@ func (i *ClientInfo) Checkpoint(docKey key.Key, docID types.ID) change.Checkpoin

// UpdateCheckpoint updates the checkpoint of the given document.
func (i *ClientInfo) UpdateCheckpoint(
docKey key.Key,
docID types.ID,
docRef types.DocRefKey,
cp change.Checkpoint,
) error {
if !i.hasDocument(docKey, docID) {
return fmt.Errorf("update checkpoint in document(%s.%s): %w",
docKey.String(), docID.String(), ErrDocumentNeverAttached)
if !i.hasDocument(docRef) {
return fmt.Errorf("update checkpoint in %s: %w", docRef, ErrDocumentNeverAttached)
}

i.Documents[docKey][docID].ServerSeq = cp.ServerSeq
i.Documents[docKey][docID].ClientSeq = cp.ClientSeq
i.Documents[docRef].ServerSeq = cp.ServerSeq
i.Documents[docRef].ClientSeq = cp.ClientSeq
i.UpdatedAt = time.Now()

return nil
}

// EnsureDocumentAttached ensures the given document is attached.
func (i *ClientInfo) EnsureDocumentAttached(docKey key.Key, docID types.ID) error {
func (i *ClientInfo) EnsureDocumentAttached(docRef types.DocRefKey) error {
if i.Status != ClientActivated {
return fmt.Errorf("ensure attached document(%s.%s) in client(%s): %w",
docKey.String(), docID.String(),
i.ID.String(),
ErrClientNotActivated,
)
return fmt.Errorf("ensure attached %s in client(%s): %w",
docRef, i.ID.String(), ErrClientNotActivated)
}

if !i.hasDocument(docKey, docID) || i.Documents[docKey][docID].Status != DocumentAttached {
return fmt.Errorf("ensure attached document(%s.%s) in client(%s): %w",
docKey.String(), docID.String(),
i.ID.String(),
ErrDocumentNotAttached,
)
if !i.hasDocument(docRef) || i.Documents[docRef].Status != DocumentAttached {
return fmt.Errorf("ensure attached %s in client(%s): %w",
docRef, i.ID.String(), ErrDocumentNotAttached)
}

return nil
Expand All @@ -224,15 +214,12 @@ func (i *ClientInfo) DeepCopy() *ClientInfo {
return nil
}

documents := make(map[key.Key]map[types.ID]*ClientDocInfo, len(i.Documents))
for docKey, v := range i.Documents {
documents[docKey] = make(map[types.ID]*ClientDocInfo, len(i.Documents[docKey]))
for docID, docInfo := range v {
documents[docKey][docID] = &ClientDocInfo{
Status: docInfo.Status,
ServerSeq: docInfo.ServerSeq,
ClientSeq: docInfo.ClientSeq,
}
documents := make(map[types.DocRefKey]*ClientDocInfo, len(i.Documents))
for docRef, docInfo := range i.Documents {
documents[docRef] = &ClientDocInfo{
Status: docInfo.Status,
ServerSeq: docInfo.ServerSeq,
ClientSeq: docInfo.ClientSeq,
}
}

Expand All @@ -247,6 +234,6 @@ func (i *ClientInfo) DeepCopy() *ClientInfo {
}
}

func (i *ClientInfo) hasDocument(docKey key.Key, docID types.ID) bool {
return i.Documents != nil && i.Documents[docKey][docID] != nil
func (i *ClientInfo) hasDocument(docRef types.DocRefKey) bool {
return i.Documents != nil && i.Documents[docRef] != nil
}
Loading

1 comment on commit f426bce

@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: f426bce Previous: 3acd623 Ratio
BenchmarkDocument/constructor_test - ns/op 1332 ns/op 1356 ns/op 0.98
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 771.3 ns/op 786.3 ns/op 0.98
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 7062 ns/op 7138 ns/op 0.99
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 16053 ns/op 16201 ns/op 0.99
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 21945 ns/op 22198 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 8288 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 32589 ns/op 29641 ns/op 1.10
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 31058 ns/op 31320 ns/op 0.99
BenchmarkDocument/text_test - B/op 14795 B/op 14795 B/op 1
BenchmarkDocument/text_test - allocs/op 468 allocs/op 468 allocs/op 1
BenchmarkDocument/text_composition_test - ns/op 28611 ns/op 29237 ns/op 0.98
BenchmarkDocument/text_composition_test - B/op 18278 B/op 18278 B/op 1
BenchmarkDocument/text_composition_test - allocs/op 477 allocs/op 477 allocs/op 1
BenchmarkDocument/rich_text_test - ns/op 81679 ns/op 82849 ns/op 0.99
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 16658 ns/op 16861 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 2887342 ns/op 2985130 ns/op 0.97
BenchmarkDocument/text_edit_gc_100 - B/op 1655225 B/op 1655239 B/op 1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op 17093 allocs/op 17092 allocs/op 1.00
BenchmarkDocument/text_edit_gc_1000 - ns/op 227936520 ns/op 234174280 ns/op 0.97
BenchmarkDocument/text_edit_gc_1000 - B/op 144342276 B/op 144368132 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 200904 allocs/op 201011 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 - ns/op 3379865 ns/op 3436736 ns/op 0.98
BenchmarkDocument/text_split_gc_100 - B/op 2313476 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 284328751 ns/op 292485836 ns/op 0.97
BenchmarkDocument/text_split_gc_1000 - B/op 228890500 B/op 228890592 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 203933 allocs/op 203938 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 - ns/op 10439057 ns/op 11958204 ns/op 0.87
BenchmarkDocument/text_delete_all_10000 - B/op 5810989 B/op 5811760 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 40677 allocs/op 40681 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 - ns/op 192013202 ns/op 192054829 ns/op 1.00
BenchmarkDocument/text_delete_all_100000 - B/op 81890297 B/op 81904042 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 411583 allocs/op 411636 allocs/op 1.00
BenchmarkDocument/text_100 - ns/op 234933 ns/op 233920 ns/op 1.00
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 2444219 ns/op 2472786 ns/op 0.99
BenchmarkDocument/text_1000 - B/op 1153053 B/op 1153071 B/op 1.00
BenchmarkDocument/text_1000 - allocs/op 50084 allocs/op 50084 allocs/op 1
BenchmarkDocument/array_1000 - ns/op 1220582 ns/op 1226516 ns/op 1.00
BenchmarkDocument/array_1000 - B/op 1091291 B/op 1091288 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11826 allocs/op 11826 allocs/op 1
BenchmarkDocument/array_10000 - ns/op 13263678 ns/op 13448793 ns/op 0.99
BenchmarkDocument/array_10000 - B/op 9799627 B/op 9798818 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120289 allocs/op 120286 allocs/op 1.00
BenchmarkDocument/array_gc_100 - ns/op 155637 ns/op 153630 ns/op 1.01
BenchmarkDocument/array_gc_100 - B/op 132493 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 1435002 ns/op 1430382 ns/op 1.00
BenchmarkDocument/array_gc_1000 - B/op 1158973 B/op 1158905 B/op 1.00
BenchmarkDocument/array_gc_1000 - allocs/op 12865 allocs/op 12864 allocs/op 1.00
BenchmarkDocument/counter_1000 - ns/op 213393 ns/op 212571 ns/op 1.00
BenchmarkDocument/counter_1000 - B/op 192850 B/op 192851 B/op 1.00
BenchmarkDocument/counter_1000 - allocs/op 5765 allocs/op 5765 allocs/op 1
BenchmarkDocument/counter_10000 - ns/op 2230438 ns/op 2224184 ns/op 1.00
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 1419887 ns/op 1424367 ns/op 1.00
BenchmarkDocument/object_1000 - B/op 1428015 B/op 1428068 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9845 allocs/op 9845 allocs/op 1
BenchmarkDocument/object_10000 - ns/op 14548988 ns/op 14642658 ns/op 0.99
BenchmarkDocument/object_10000 - B/op 12167118 B/op 12167843 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 100562 allocs/op 100562 allocs/op 1
BenchmarkDocument/tree_100 - ns/op 756301 ns/op 744469 ns/op 1.02
BenchmarkDocument/tree_100 - B/op 442890 B/op 442890 B/op 1
BenchmarkDocument/tree_100 - allocs/op 4506 allocs/op 4506 allocs/op 1
BenchmarkDocument/tree_1000 - ns/op 53306879 ns/op 50380066 ns/op 1.06
BenchmarkDocument/tree_1000 - B/op 35222212 B/op 35222527 B/op 1.00
BenchmarkDocument/tree_1000 - allocs/op 44119 allocs/op 44118 allocs/op 1.00
BenchmarkDocument/tree_10000 - ns/op 6714295291 ns/op 6537517333 ns/op 1.03
BenchmarkDocument/tree_10000 - B/op 3438882224 B/op 3438881024 B/op 1.00
BenchmarkDocument/tree_10000 - allocs/op 440206 allocs/op 440197 allocs/op 1.00
BenchmarkDocument/tree_delete_all_1000 - ns/op 53818638 ns/op 50383873 ns/op 1.07
BenchmarkDocument/tree_delete_all_1000 - B/op 35702266 B/op 35686781 B/op 1.00
BenchmarkDocument/tree_delete_all_1000 - allocs/op 51743 allocs/op 51744 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_100 - ns/op 2726314 ns/op 2640190 ns/op 1.03
BenchmarkDocument/tree_edit_gc_100 - B/op 2099486 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 212286989 ns/op 203482588 ns/op 1.04
BenchmarkDocument/tree_edit_gc_1000 - B/op 180291390 B/op 180290254 B/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 113348 allocs/op 113352 allocs/op 1.00
BenchmarkDocument/tree_split_gc_100 - ns/op 1988711 ns/op 1956842 ns/op 1.02
BenchmarkDocument/tree_split_gc_100 - B/op 1363432 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 137834008 ns/op 135715287 ns/op 1.02
BenchmarkDocument/tree_split_gc_1000 - B/op 120283599 B/op 120284779 B/op 1.00
BenchmarkDocument/tree_split_gc_1000 - allocs/op 96191 allocs/op 96190 allocs/op 1.00
BenchmarkRPC/client_to_server - ns/op 363470292 ns/op 359703488 ns/op 1.01
BenchmarkRPC/client_to_server - B/op 12487818 B/op 12458544 B/op 1.00
BenchmarkRPC/client_to_server - allocs/op 178504 allocs/op 176321 allocs/op 1.01
BenchmarkRPC/client_to_client_via_server - ns/op 616172911 ns/op 603988013 ns/op 1.02
BenchmarkRPC/client_to_client_via_server - B/op 23122672 B/op 23259432 B/op 0.99
BenchmarkRPC/client_to_client_via_server - allocs/op 335142 allocs/op 331024 allocs/op 1.01
BenchmarkRPC/attach_large_document - ns/op 1178572005 ns/op 1381620656 ns/op 0.85
BenchmarkRPC/attach_large_document - B/op 1823491904 B/op 1820736296 B/op 1.00
BenchmarkRPC/attach_large_document - allocs/op 10858 allocs/op 10374 allocs/op 1.05
BenchmarkRPC/adminCli_to_server - ns/op 506500148 ns/op 506711988 ns/op 1.00
BenchmarkRPC/adminCli_to_server - B/op 20212776 B/op 20155856 B/op 1.00
BenchmarkRPC/adminCli_to_server - allocs/op 320758 allocs/op 317226 allocs/op 1.01
BenchmarkLocker - ns/op 71.4 ns/op 67.15 ns/op 1.06
BenchmarkLocker - B/op 16 B/op 16 B/op 1
BenchmarkLocker - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkLockerParallel - ns/op 39.74 ns/op 41.59 ns/op 0.96
BenchmarkLockerParallel - B/op 0 B/op 0 B/op NaN
BenchmarkLockerParallel - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkLockerMoreKeys - ns/op 156.9 ns/op 160.5 ns/op 0.98
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 4156904 ns/op 4228009 ns/op 0.98
BenchmarkChange/Push_10_Changes - B/op 147050 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 15440690 ns/op 15569560 ns/op 0.99
BenchmarkChange/Push_100_Changes - B/op 704206 B/op 714288 B/op 0.99
BenchmarkChange/Push_100_Changes - allocs/op 6868 allocs/op 6857 allocs/op 1.00
BenchmarkChange/Push_1000_Changes - ns/op 122415651 ns/op 122971913 ns/op 1.00
BenchmarkChange/Push_1000_Changes - B/op 6168200 B/op 6319134 B/op 0.98
BenchmarkChange/Push_1000_Changes - allocs/op 64375 allocs/op 64364 allocs/op 1.00
BenchmarkChange/Pull_10_Changes - ns/op 3216200 ns/op 3266944 ns/op 0.98
BenchmarkChange/Pull_10_Changes - B/op 124234 B/op 123436 B/op 1.01
BenchmarkChange/Pull_10_Changes - allocs/op 1015 allocs/op 1006 allocs/op 1.01
BenchmarkChange/Pull_100_Changes - ns/op 5085369 ns/op 5267253 ns/op 0.97
BenchmarkChange/Pull_100_Changes - B/op 327377 B/op 325367 B/op 1.01
BenchmarkChange/Pull_100_Changes - allocs/op 3484 allocs/op 3475 allocs/op 1.00
BenchmarkChange/Pull_1000_Changes - ns/op 9786770 ns/op 10054426 ns/op 0.97
BenchmarkChange/Pull_1000_Changes - B/op 1639694 B/op 1636062 B/op 1.00
BenchmarkChange/Pull_1000_Changes - allocs/op 29855 allocs/op 29837 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - ns/op 19546815 ns/op 19612724 ns/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - B/op 952246 B/op 947220 B/op 1.01
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op 6872 allocs/op 6862 allocs/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - ns/op 128227344 ns/op 128964020 ns/op 0.99
BenchmarkSnapshot/Push_30KB_snapshot - B/op 6321645 B/op 6446989 B/op 0.98
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op 64185 allocs/op 64177 allocs/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op 7505222 ns/op 7629068 ns/op 0.98
BenchmarkSnapshot/Pull_3KB_snapshot - B/op 1017365 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 15701727 ns/op 16093336 ns/op 0.98
BenchmarkSnapshot/Pull_30KB_snapshot - B/op 7332663 B/op 7331584 B/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op 150122 allocs/op 150113 allocs/op 1.00
BenchmarkSync/memory_sync_10_test - ns/op 6982 ns/op 7126 ns/op 0.98
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 52893 ns/op 55219 ns/op 0.96
BenchmarkSync/memory_sync_100_test - B/op 8633 B/op 8990 B/op 0.96
BenchmarkSync/memory_sync_100_test - allocs/op 272 allocs/op 295 allocs/op 0.92
BenchmarkSync/memory_sync_1000_test - ns/op 578730 ns/op 440383 ns/op 1.31
BenchmarkSync/memory_sync_1000_test - B/op 75033 B/op 83572 B/op 0.90
BenchmarkSync/memory_sync_1000_test - allocs/op 2149 allocs/op 2682 allocs/op 0.80
BenchmarkSync/memory_sync_10000_test - ns/op 7135952 ns/op 4564967 ns/op 1.56
BenchmarkSync/memory_sync_10000_test - B/op 759502 B/op 818933 B/op 0.93
BenchmarkSync/memory_sync_10000_test - allocs/op 20573 allocs/op 24458 allocs/op 0.84
BenchmarkTextEditing - ns/op 19168412338 ns/op 19066495451 ns/op 1.01
BenchmarkTextEditing - B/op 9037729184 B/op 9038245440 B/op 1.00
BenchmarkTextEditing - allocs/op 19922153 allocs/op 19924611 allocs/op 1.00

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

Please sign in to comment.