Skip to content

Commit

Permalink
Use DocRefKey type in Pubsub
Browse files Browse the repository at this point in the history
  • Loading branch information
sejongk committed Nov 29, 2023
1 parent 2a0c2bc commit 25565a8
Show file tree
Hide file tree
Showing 15 changed files with 110 additions and 127 deletions.
2 changes: 1 addition & 1 deletion admin/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,11 @@ func (c *Client) ListDocuments(
ctx,
&api.ListDocumentsRequest{
ProjectName: projectName,
PreviousKey: previousOffset.Key.String(),
PreviousId: previousOffset.ID.String(),
PageSize: pageSize,
IsForward: isForward,
IncludeSnapshot: includeSnapshot,
PreviousKey: previousOffset.Key.String(),
},
)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion api/types/resource_ref_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ 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
// 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, ",")
Expand Down
2 changes: 1 addition & 1 deletion cmd/yorkie/document/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func init() {
cmd.Flags().Var(
&previousOffset,
"previous-offset",
"The previous document offset to start from",
"The previous document offset to start from. Use the format 'docKey,docID' for the input.",
)
cmd.Flags().Int32Var(
&pageSize,
Expand Down
2 changes: 1 addition & 1 deletion pkg/document/change/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type ID struct {
clientSeq uint32

// serverSeq is the sequence of the change on the server. We can find the
// change with serverSeq and documentID in the server. If the change is not
// change with serverSeq, documentKey and documentID in the server. If the change is not
// stored on the server, serverSeq is 0.
serverSeq int64

Expand Down
2 changes: 1 addition & 1 deletion server/backend/database/doc_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type DocInfo struct {
// OwnerKey is the key of the document owner.
OwnerKey string `bson:"owner_key"`

// OwnerKey is the ID of the document owner.
// OwnerID is the ID of the document owner.
OwnerID types.ID `bson:"owner_id"`

// CreatedAt is the time when the document is created.
Expand Down
7 changes: 2 additions & 5 deletions server/backend/sync/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
gotime "time"

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

Expand All @@ -42,15 +41,13 @@ type Coordinator interface {
Subscribe(
ctx context.Context,
subscriber *time.ActorID,
documentKey key.Key,
documentID types.ID,
documentRef types.DocRefKey,
) (*Subscription, []*time.ActorID, error)

// Unsubscribe unsubscribes from the given documents.
Unsubscribe(
ctx context.Context,
documentKey key.Key,
documentID types.ID,
documentRef types.DocRefKey,
sub *Subscription,
) error

Expand Down
13 changes: 5 additions & 8 deletions server/backend/sync/memory/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"context"

"github.com/yorkie-team/yorkie/api/types"
"github.com/yorkie-team/yorkie/pkg/document/key"
"github.com/yorkie-team/yorkie/pkg/document/time"
"github.com/yorkie-team/yorkie/pkg/locker"
"github.com/yorkie-team/yorkie/server/backend/sync"
Expand Down Expand Up @@ -59,26 +58,24 @@ func (c *Coordinator) NewLocker(
func (c *Coordinator) Subscribe(
ctx context.Context,
subscriber *time.ActorID,
documentKey key.Key,
documentID types.ID,
documentRef types.DocRefKey,
) (*sync.Subscription, []*time.ActorID, error) {
sub, err := c.pubSub.Subscribe(ctx, subscriber, documentKey, documentID)
sub, err := c.pubSub.Subscribe(ctx, subscriber, documentRef)
if err != nil {
return nil, nil, err
}

ids := c.pubSub.ClientIDs(documentKey, documentID)
ids := c.pubSub.ClientIDs(documentRef)
return sub, ids, nil
}

// Unsubscribe unsubscribes the given documents.
func (c *Coordinator) Unsubscribe(
ctx context.Context,
documentKey key.Key,
documentID types.ID,
documentRef types.DocRefKey,
sub *sync.Subscription,
) error {
c.pubSub.Unsubscribe(ctx, documentKey, documentID, sub)
c.pubSub.Unsubscribe(ctx, documentRef, sub)
return nil
}

Expand Down
6 changes: 5 additions & 1 deletion server/backend/sync/memory/coordinator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@ func TestCoordinator(t *testing.T) {
coordinator := memory.NewCoordinator(nil)
docKey := key.Key(t.Name() + "key")
docID := types.ID(t.Name() + "id")
docRef := types.DocRefKey{
Key: docKey,
ID: docID,
}
ctx := context.Background()

for i := 0; i < 5; i++ {
id, err := time.ActorIDFromBytes([]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, byte(i)})
assert.NoError(t, err)

_, clientIDs, err := coordinator.Subscribe(ctx, id, docKey, docID)
_, clientIDs, err := coordinator.Subscribe(ctx, id, docRef)
assert.NoError(t, err)
assert.Len(t, clientIDs, i+1)
}
Expand Down
126 changes: 58 additions & 68 deletions server/backend/sync/memory/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"go.uber.org/zap"

"github.com/yorkie-team/yorkie/api/types"
"github.com/yorkie-team/yorkie/pkg/document/key"
"github.com/yorkie-team/yorkie/pkg/document/time"
"github.com/yorkie-team/yorkie/server/backend/sync"
"github.com/yorkie-team/yorkie/server/logging"
Expand Down Expand Up @@ -67,28 +66,27 @@ func (s *subscriptions) Len() int {
// PubSub is the memory implementation of PubSub, used for single server.
type PubSub struct {
subscriptionsMapMu *gosync.RWMutex
subscriptionsMapByDoc map[key.Key]map[types.ID]*subscriptions
subscriptionsMapByDoc map[types.DocRefKey]*subscriptions
}

// NewPubSub creates an instance of PubSub.
func NewPubSub() *PubSub {
return &PubSub{
subscriptionsMapMu: &gosync.RWMutex{},
subscriptionsMapByDoc: make(map[key.Key]map[types.ID]*subscriptions),
subscriptionsMapByDoc: make(map[types.DocRefKey]*subscriptions),
}
}

// Subscribe subscribes to the given document keys.
func (m *PubSub) Subscribe(
ctx context.Context,
subscriber *time.ActorID,
documentKey key.Key,
documentID types.ID,
documentRef types.DocRefKey,
) (*sync.Subscription, error) {
if logging.Enabled(zap.DebugLevel) {
logging.From(ctx).Debugf(
`Subscribe(%s.%s,%s) Start`,
documentKey, documentID,
`Subscribe(%s,%s) Start`,
documentRef,
subscriber.String(),
)
}
Expand All @@ -97,18 +95,15 @@ func (m *PubSub) Subscribe(
defer m.subscriptionsMapMu.Unlock()

sub := sync.NewSubscription(subscriber)
if _, ok := m.subscriptionsMapByDoc[documentKey]; !ok {
m.subscriptionsMapByDoc[documentKey] = make(map[types.ID]*subscriptions)
if _, ok := m.subscriptionsMapByDoc[documentRef]; !ok {
m.subscriptionsMapByDoc[documentRef] = newSubscriptions()
}
if _, ok := m.subscriptionsMapByDoc[documentKey][documentID]; !ok {
m.subscriptionsMapByDoc[documentKey][documentID] = newSubscriptions()
}
m.subscriptionsMapByDoc[documentKey][documentID].Add(sub)
m.subscriptionsMapByDoc[documentRef].Add(sub)

if logging.Enabled(zap.DebugLevel) {
logging.From(ctx).Debugf(
`Subscribe(%s.%s,%s) End`,
documentKey, documentID,
`Subscribe(%s,%s) End`,
documentRef,
subscriber.String(),
)
}
Expand All @@ -118,40 +113,34 @@ func (m *PubSub) Subscribe(
// Unsubscribe unsubscribes the given docKeys.
func (m *PubSub) Unsubscribe(
ctx context.Context,
documentKey key.Key,
documentID types.ID,
documentRef types.DocRefKey,
sub *sync.Subscription,
) {
m.subscriptionsMapMu.Lock()
defer m.subscriptionsMapMu.Unlock()

if logging.Enabled(zap.DebugLevel) {
logging.From(ctx).Debugf(
`Unsubscribe(%s.%s,%s) Start`,
documentKey, documentID,
`Unsubscribe(%s,%s) Start`,
documentRef,
sub.Subscriber().String(),
)
}

sub.Close()

if subsByDocID, ok := m.subscriptionsMapByDoc[documentKey]; ok {
if subs, ok := subsByDocID[documentID]; ok {
subs.Delete(sub.ID())
if subs, ok := m.subscriptionsMapByDoc[documentRef]; ok {
subs.Delete(sub.ID())

if subs.Len() == 0 {
delete(m.subscriptionsMapByDoc[documentKey], documentID)
}
}
if len(subsByDocID) == 0 {
delete(m.subscriptionsMapByDoc, documentKey)
if subs.Len() == 0 {
delete(m.subscriptionsMapByDoc, documentRef)
}
}

if logging.Enabled(zap.DebugLevel) {
logging.From(ctx).Debugf(
`Unsubscribe(%s.%s,%s) End`,
documentKey, documentID,
`Unsubscribe(%s,%s) End`,
documentRef,
sub.Subscriber().String(),
)
}
Expand All @@ -166,60 +155,61 @@ func (m *PubSub) Publish(
m.subscriptionsMapMu.RLock()
defer m.subscriptionsMapMu.RUnlock()

documentKey := event.DocumentKey
documentID := event.DocumentID
documentRef := event.DocumentRef
if logging.Enabled(zap.DebugLevel) {
logging.From(ctx).Debugf(`Publish(%s.%s,%s) Start`,
documentKey, documentID,
publisherID.String())
logging.From(ctx).Debugf(
`Publish(%s,%s) Start`,
documentRef,
publisherID.String(),
)
}

if subsByDocID, ok := m.subscriptionsMapByDoc[documentKey]; ok {
if subs, ok := subsByDocID[documentID]; ok {
for _, sub := range subs.Map() {
if sub.Subscriber().Compare(publisherID) == 0 {
continue
}

if logging.Enabled(zap.DebugLevel) {
logging.From(ctx).Debugf(
`Publish %s(%s.%s,%s) to %s`,
event.Type,
documentKey, documentID,
publisherID.String(),
sub.Subscriber().String(),
)
}

// NOTE: When a subscription is being closed by a subscriber,
// the subscriber may not receive messages.
select {
case sub.Events() <- event:
case <-gotime.After(100 * gotime.Millisecond):
logging.From(ctx).Warnf(
`Publish(%s.%s,%s) to %s timeout`,
documentKey, documentID,
publisherID.String(),
sub.Subscriber().String(),
)
}
if subs, ok := m.subscriptionsMapByDoc[documentRef]; ok {
for _, sub := range subs.Map() {
if sub.Subscriber().Compare(publisherID) == 0 {
continue
}

if logging.Enabled(zap.DebugLevel) {
logging.From(ctx).Debugf(
`Publish %s(%s,%s) to %s`,
event.Type,
documentRef,
publisherID.String(),
sub.Subscriber().String(),
)
}

// NOTE: When a subscription is being closed by a subscriber,
// the subscriber may not receive messages.
select {
case sub.Events() <- event:
case <-gotime.After(100 * gotime.Millisecond):
logging.From(ctx).Warnf(
`Publish(%s,%s) to %s timeout`,
documentRef,
publisherID.String(),
sub.Subscriber().String(),
)
}
}
}

if logging.Enabled(zap.DebugLevel) {
logging.From(ctx).Debugf(`Publish(%s.%s,%s) End`,
documentKey, documentID,
logging.From(ctx).Debugf(
`Publish(%s,%s) End`,
documentRef,
publisherID.String())
}
}

// ClientIDs returns the clients of the given document.
func (m *PubSub) ClientIDs(documentKey key.Key, documentID types.ID) []*time.ActorID {
func (m *PubSub) ClientIDs(documentRef types.DocRefKey) []*time.ActorID {
m.subscriptionsMapMu.RLock()
defer m.subscriptionsMapMu.RUnlock()

var ids []*time.ActorID
for _, sub := range m.subscriptionsMapByDoc[documentKey][documentID].Map() {
for _, sub := range m.subscriptionsMapByDoc[documentRef].Map() {
ids = append(ids, sub.Subscriber())
}
return ids
Expand Down
11 changes: 7 additions & 4 deletions server/backend/sync/memory/pubsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,22 @@ func TestPubSub(t *testing.T) {
pubSub := memory.NewPubSub()
key := key.Key(t.Name() + "key")
id := types.ID(t.Name() + "id")
docRef := types.DocRefKey{
Key: key,
ID: id,
}
docEvent := sync.DocEvent{
Type: types.DocumentWatchedEvent,
Publisher: idB,
DocumentKey: key,
DocumentID: id,
DocumentRef: docRef,
}

ctx := context.Background()
// subscribe the documents by actorA
subA, err := pubSub.Subscribe(ctx, idA, key, id)
subA, err := pubSub.Subscribe(ctx, idA, docRef)
assert.NoError(t, err)
defer func() {
pubSub.Unsubscribe(ctx, key, id, subA)
pubSub.Unsubscribe(ctx, docRef, subA)
}()

var wg gosync.WaitGroup
Expand Down
4 changes: 1 addition & 3 deletions server/backend/sync/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"github.com/rs/xid"

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

Expand Down Expand Up @@ -50,8 +49,7 @@ func (s *Subscription) ID() string {
type DocEvent struct {
Type types.DocEventType
Publisher *time.ActorID
DocumentKey key.Key
DocumentID types.ID
DocumentRef types.DocRefKey
Body types.DocEventBody
}

Expand Down
Loading

1 comment on commit 25565a8

@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: 25565a8 Previous: 3acd623 Ratio
BenchmarkDocument/constructor_test - ns/op 1361 ns/op 1356 ns/op 1.00
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 773.5 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 8441 ns/op 7138 ns/op 1.18
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 16079 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 22000 ns/op 22198 ns/op 0.99
BenchmarkDocument/delete_test - B/op 15187 B/op 15188 B/op 1.00
BenchmarkDocument/delete_test - allocs/op 333 allocs/op 333 allocs/op 1
BenchmarkDocument/object_test - ns/op 8499 ns/op 10199 ns/op 0.83
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 28741 ns/op 29641 ns/op 0.97
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 30545 ns/op 31320 ns/op 0.98
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 29072 ns/op 29237 ns/op 0.99
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 81358 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 16705 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 2890328 ns/op 2985130 ns/op 0.97
BenchmarkDocument/text_edit_gc_100 - B/op 1655273 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 229312176 ns/op 234174280 ns/op 0.98
BenchmarkDocument/text_edit_gc_1000 - B/op 144352616 B/op 144368132 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 200939 allocs/op 201011 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 - ns/op 3376524 ns/op 3436736 ns/op 0.98
BenchmarkDocument/text_split_gc_100 - B/op 2313534 B/op 2313433 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 16194 allocs/op 16193 allocs/op 1.00
BenchmarkDocument/text_split_gc_1000 - ns/op 284000162 ns/op 292485836 ns/op 0.97
BenchmarkDocument/text_split_gc_1000 - B/op 228881008 B/op 228890592 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 203921 allocs/op 203938 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 - ns/op 10867897 ns/op 11958204 ns/op 0.91
BenchmarkDocument/text_delete_all_10000 - B/op 5812723 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 182347038 ns/op 192054829 ns/op 0.95
BenchmarkDocument/text_delete_all_100000 - B/op 81910776 B/op 81904042 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 411662 allocs/op 411636 allocs/op 1.00
BenchmarkDocument/text_100 - ns/op 231042 ns/op 233920 ns/op 0.99
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 2462943 ns/op 2472786 ns/op 1.00
BenchmarkDocument/text_1000 - B/op 1153071 B/op 1153071 B/op 1
BenchmarkDocument/text_1000 - allocs/op 50084 allocs/op 50084 allocs/op 1
BenchmarkDocument/array_1000 - ns/op 1234478 ns/op 1226516 ns/op 1.01
BenchmarkDocument/array_1000 - B/op 1091349 B/op 1091288 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11826 allocs/op 11826 allocs/op 1
BenchmarkDocument/array_10000 - ns/op 13178344 ns/op 13448793 ns/op 0.98
BenchmarkDocument/array_10000 - B/op 9800458 B/op 9798818 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120292 allocs/op 120286 allocs/op 1.00
BenchmarkDocument/array_gc_100 - ns/op 153006 ns/op 153630 ns/op 1.00
BenchmarkDocument/array_gc_100 - B/op 132498 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 1414550 ns/op 1430382 ns/op 0.99
BenchmarkDocument/array_gc_1000 - B/op 1159011 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 212345 ns/op 212571 ns/op 1.00
BenchmarkDocument/counter_1000 - B/op 192853 B/op 192851 B/op 1.00
BenchmarkDocument/counter_1000 - allocs/op 5765 allocs/op 5765 allocs/op 1
BenchmarkDocument/counter_10000 - ns/op 2228052 ns/op 2224184 ns/op 1.00
BenchmarkDocument/counter_10000 - B/op 2087767 B/op 2087765 B/op 1.00
BenchmarkDocument/counter_10000 - allocs/op 59772 allocs/op 59772 allocs/op 1
BenchmarkDocument/object_1000 - ns/op 1427635 ns/op 1424367 ns/op 1.00
BenchmarkDocument/object_1000 - B/op 1428275 B/op 1428068 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9846 allocs/op 9845 allocs/op 1.00
BenchmarkDocument/object_10000 - ns/op 14861507 ns/op 14642658 ns/op 1.01
BenchmarkDocument/object_10000 - B/op 12167429 B/op 12167843 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 100562 allocs/op 100562 allocs/op 1
BenchmarkDocument/tree_100 - ns/op 758649 ns/op 744469 ns/op 1.02
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 52397255 ns/op 50380066 ns/op 1.04
BenchmarkDocument/tree_1000 - B/op 35222580 B/op 35222527 B/op 1.00
BenchmarkDocument/tree_1000 - allocs/op 44118 allocs/op 44118 allocs/op 1
BenchmarkDocument/tree_10000 - ns/op 6677888301 ns/op 6537517333 ns/op 1.02
BenchmarkDocument/tree_10000 - B/op 3438863424 B/op 3438881024 B/op 1.00
BenchmarkDocument/tree_10000 - allocs/op 440190 allocs/op 440197 allocs/op 1.00
BenchmarkDocument/tree_delete_all_1000 - ns/op 53636038 ns/op 50383873 ns/op 1.06
BenchmarkDocument/tree_delete_all_1000 - B/op 35687640 B/op 35686781 B/op 1.00
BenchmarkDocument/tree_delete_all_1000 - allocs/op 51744 allocs/op 51744 allocs/op 1
BenchmarkDocument/tree_edit_gc_100 - ns/op 2794613 ns/op 2640190 ns/op 1.06
BenchmarkDocument/tree_edit_gc_100 - B/op 2099556 B/op 2100192 B/op 1.00
BenchmarkDocument/tree_edit_gc_100 - allocs/op 11166 allocs/op 11165 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - ns/op 215898783 ns/op 203482588 ns/op 1.06
BenchmarkDocument/tree_edit_gc_1000 - B/op 180293585 B/op 180290254 B/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 113352 allocs/op 113352 allocs/op 1
BenchmarkDocument/tree_split_gc_100 - ns/op 2036402 ns/op 1956842 ns/op 1.04
BenchmarkDocument/tree_split_gc_100 - B/op 1364009 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 136660974 ns/op 135715287 ns/op 1.01
BenchmarkDocument/tree_split_gc_1000 - B/op 120285737 B/op 120284779 B/op 1.00
BenchmarkDocument/tree_split_gc_1000 - allocs/op 96201 allocs/op 96190 allocs/op 1.00
BenchmarkRPC/client_to_server - ns/op 361768721 ns/op 359703488 ns/op 1.01
BenchmarkRPC/client_to_server - B/op 12492770 B/op 12458544 B/op 1.00
BenchmarkRPC/client_to_server - allocs/op 178495 allocs/op 176321 allocs/op 1.01
BenchmarkRPC/client_to_client_via_server - ns/op 615488003 ns/op 603988013 ns/op 1.02
BenchmarkRPC/client_to_client_via_server - B/op 23155784 B/op 23259432 B/op 1.00
BenchmarkRPC/client_to_client_via_server - allocs/op 335301 allocs/op 331024 allocs/op 1.01
BenchmarkRPC/attach_large_document - ns/op 1070633358 ns/op 1381620656 ns/op 0.77
BenchmarkRPC/attach_large_document - B/op 1809999608 B/op 1820736296 B/op 0.99
BenchmarkRPC/attach_large_document - allocs/op 10837 allocs/op 10374 allocs/op 1.04
BenchmarkRPC/adminCli_to_server - ns/op 504208712 ns/op 506711988 ns/op 1.00
BenchmarkRPC/adminCli_to_server - B/op 20213076 B/op 20155856 B/op 1.00
BenchmarkRPC/adminCli_to_server - allocs/op 320715 allocs/op 317226 allocs/op 1.01
BenchmarkLocker - ns/op 70.09 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.05 ns/op 41.59 ns/op 0.91
BenchmarkLockerParallel - B/op 0 B/op 0 B/op NaN
BenchmarkLockerParallel - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkLockerMoreKeys - ns/op 156.7 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 4141028 ns/op 4228009 ns/op 0.98
BenchmarkChange/Push_10_Changes - B/op 146736 B/op 147011 B/op 1.00
BenchmarkChange/Push_10_Changes - allocs/op 1314 allocs/op 1305 allocs/op 1.01
BenchmarkChange/Push_100_Changes - ns/op 15409381 ns/op 15569560 ns/op 0.99
BenchmarkChange/Push_100_Changes - B/op 700469 B/op 714288 B/op 0.98
BenchmarkChange/Push_100_Changes - allocs/op 6866 allocs/op 6857 allocs/op 1.00
BenchmarkChange/Push_1000_Changes - ns/op 122712423 ns/op 122971913 ns/op 1.00
BenchmarkChange/Push_1000_Changes - B/op 6300299 B/op 6319134 B/op 1.00
BenchmarkChange/Push_1000_Changes - allocs/op 64374 allocs/op 64364 allocs/op 1.00
BenchmarkChange/Pull_10_Changes - ns/op 3205804 ns/op 3266944 ns/op 0.98
BenchmarkChange/Pull_10_Changes - B/op 124222 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 5071443 ns/op 5267253 ns/op 0.96
BenchmarkChange/Pull_100_Changes - B/op 327103 B/op 325367 B/op 1.01
BenchmarkChange/Pull_100_Changes - allocs/op 3485 allocs/op 3475 allocs/op 1.00
BenchmarkChange/Pull_1000_Changes - ns/op 9658425 ns/op 10054426 ns/op 0.96
BenchmarkChange/Pull_1000_Changes - B/op 1639699 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 19190401 ns/op 19612724 ns/op 0.98
BenchmarkSnapshot/Push_3KB_snapshot - B/op 957805 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 127886543 ns/op 128964020 ns/op 0.99
BenchmarkSnapshot/Push_30KB_snapshot - B/op 6217746 B/op 6446989 B/op 0.96
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op 64181 allocs/op 64177 allocs/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op 7555751 ns/op 7629068 ns/op 0.99
BenchmarkSnapshot/Pull_3KB_snapshot - B/op 1017382 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 16318077 ns/op 16093336 ns/op 1.01
BenchmarkSnapshot/Pull_30KB_snapshot - B/op 7335244 B/op 7331584 B/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op 150119 allocs/op 150113 allocs/op 1.00
BenchmarkSync/memory_sync_10_test - ns/op 7050 ns/op 7126 ns/op 0.99
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 53031 ns/op 55219 ns/op 0.96
BenchmarkSync/memory_sync_100_test - B/op 8636 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 588183 ns/op 440383 ns/op 1.34
BenchmarkSync/memory_sync_1000_test - B/op 74524 B/op 83572 B/op 0.89
BenchmarkSync/memory_sync_1000_test - allocs/op 2122 allocs/op 2682 allocs/op 0.79
BenchmarkSync/memory_sync_10000_test - ns/op 7222165 ns/op 4564967 ns/op 1.58
BenchmarkSync/memory_sync_10000_test - B/op 760586 B/op 818933 B/op 0.93
BenchmarkSync/memory_sync_10000_test - allocs/op 20563 allocs/op 24458 allocs/op 0.84
BenchmarkTextEditing - ns/op 18506375268 ns/op 19066495451 ns/op 0.97
BenchmarkTextEditing - B/op 9038200400 B/op 9038245440 B/op 1.00
BenchmarkTextEditing - allocs/op 19924385 allocs/op 19924611 allocs/op 1.00

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

Please sign in to comment.