Skip to content

Commit

Permalink
Change ref key of Clients from _id into (key, _id)
Browse files Browse the repository at this point in the history
  • Loading branch information
sejongk committed Nov 28, 2023
1 parent d576664 commit 81bebc4
Show file tree
Hide file tree
Showing 17 changed files with 762 additions and 153 deletions.
453 changes: 406 additions & 47 deletions api/yorkie/v1/yorkie.pb.go

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions api/yorkie/v1/yorkie.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ message ActivateClientResponse {

message DeactivateClientRequest {
string client_id = 1;
string client_key = 2;
}

message DeactivateClientResponse {
Expand All @@ -57,6 +58,7 @@ message DeactivateClientResponse {
message AttachDocumentRequest {
string client_id = 1;
ChangePack change_pack = 2;
string client_key = 3;
}

message AttachDocumentResponse {
Expand All @@ -69,6 +71,7 @@ message DetachDocumentRequest {
string document_id = 2;
ChangePack change_pack = 3;
bool remove_if_not_attached = 4;
string client_key = 5;
}

message DetachDocumentResponse {
Expand All @@ -79,6 +82,7 @@ message WatchDocumentRequest {
string client_id = 1;
string document_id = 2;
string document_key = 3;
string client_key = 4;
}

message WatchDocumentResponse {
Expand All @@ -96,6 +100,7 @@ message RemoveDocumentRequest {
string client_id = 1;
string document_id = 2;
ChangePack change_pack = 3;
string client_key = 4;
}

message RemoveDocumentResponse {
Expand All @@ -107,6 +112,7 @@ message PushPullChangesRequest {
string document_id = 2;
ChangePack change_pack = 3;
bool push_only = 4;
string client_key = 5;
}

message PushPullChangesResponse {
Expand All @@ -119,6 +125,7 @@ message BroadcastRequest {
string topic = 3;
bytes payload = 4;
string document_key = 5;
string client_key = 6;
}

message BroadcastResponse {
Expand Down
34 changes: 25 additions & 9 deletions build/docker/sharding/test/scripts/init-mongos1.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,44 @@ sh.addShard("shard-rs-2/shard2-1:27017")
// The DB 'yorkie-meta-1' is for the mongo client test.
sh.enableSharding("yorkie-meta-1")
sh.shardCollection("yorkie-meta-1.users", { username: 1 }, true)
// sh.shardCollection("yorkie-meta-1.clients", { _id: 1 }, true)
sh.shardCollection("yorkie-meta-1.clients", { key: 1 })
sh.shardCollection("yorkie-meta-1.documents", { key: 1 })
sh.shardCollection("yorkie-meta-1.changes", { doc_key: 1 })
sh.shardCollection("yorkie-meta-1.snapshots", { doc_key: 1 })
sh.shardCollection("yorkie-meta-1.syncedseqs", { doc_key: 1 })

const docSplitKey = "duplicateIDTestDocKey5"
const clientSplitKey = "duplicateIDTestClientKey5"

// Split the inital range at "duplicateIDTestDocKey5" to allow doc_ids duplicate in different shards.
sh.splitAt("yorkie-meta-1.documents", { key: "duplicateIDTestDocKey5" })
sh.splitAt("yorkie-meta-1.documents", { key: docSplitKey })
// Move the chunk to another shard.
const currentDocShard = db.getSiblingDB("config").chunks.findOne({ min: { key: docSplitKey } }).shard
var nextDocShard = ""
if (currentDocShard == "shard-rs-1") {
nextDocShard = "shard-rs-2"
} else {
nextDocShard = "shard-rs-1"
}
db.adminCommand({ moveChunk: "yorkie-meta-1.documents", find: { key: docSplitKey }, to: nextDocShard })

// Split the inital range at "duplicateIDTestClientKey5" to allow client_ids duplicate in different shards.
sh.splitAt("yorkie-meta-1.clients", { key: clientSplitKey })
// Move the chunk to another shard.
const currentShard = db.getSiblingDB("config").chunks.findOne({ min: { key: 'duplicateIDTestDocKey5' } }).shard
var nextShard = ""
if (currentShard == "shard-rs-1") {
nextShard = "shard-rs-2"
const currentClientShard = db.getSiblingDB("config").chunks.findOne({ min: { key: clientSplitKey } }).shard
var nextClientShard = ""
if (currentClientShard == "shard-rs-1") {
nextClientShard = "shard-rs-2"
} else {
nextShard = "shard-rs-1"
nextClientShard = "shard-rs-1"
}
db.adminCommand({ moveChunk: "yorkie-meta-1.documents", find: { key: "duplicateIDTestDocKey5" }, to: nextShard })
db.adminCommand({ moveChunk: "yorkie-meta-1.clients", find: { key: clientSplitKey }, to: nextClientShard })


// The DB 'yorkie-meta-2' is for the server test.
sh.enableSharding("yorkie-meta-2")
sh.shardCollection("yorkie-meta-2.users", { username: 1 }, true)
// sh.shardCollection("yorkie-meta-2.clients", { _id: 1 }, true)
sh.shardCollection("yorkie-meta-2.clients", { key: 1 })
sh.shardCollection("yorkie-meta-2.documents", { key: 1 })
sh.shardCollection("yorkie-meta-2.changes", { doc_key: 1 })
sh.shardCollection("yorkie-meta-2.snapshots", { doc_key: 1 })
Expand Down
9 changes: 8 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ func (c *Client) Deactivate(ctx context.Context) error {
}

_, err := c.client.DeactivateClient(withShardKey(ctx, c.options.APIKey), &api.DeactivateClientRequest{
ClientId: c.id.String(),
ClientKey: c.key,
ClientId: c.id.String(),
})
if err != nil {
return err
Expand Down Expand Up @@ -277,6 +278,7 @@ func (c *Client) Attach(ctx context.Context, doc *document.Document, options ...
res, err := c.client.AttachDocument(
withShardKey(ctx, c.options.APIKey, doc.Key().String()),
&api.AttachDocumentRequest{
ClientKey: c.key,
ClientId: c.id.String(),
ChangePack: pbChangePack,
},
Expand Down Expand Up @@ -350,6 +352,7 @@ func (c *Client) Detach(ctx context.Context, doc *document.Document, options ...
res, err := c.client.DetachDocument(
withShardKey(ctx, c.options.APIKey, doc.Key().String()),
&api.DetachDocumentRequest{
ClientKey: c.key,
ClientId: c.id.String(),
DocumentId: attachment.docID.String(),
ChangePack: pbChangePack,
Expand Down Expand Up @@ -413,6 +416,7 @@ func (c *Client) Watch(
stream, err := c.client.WatchDocument(
withShardKey(ctx, c.options.APIKey, doc.Key().String()),
&api.WatchDocumentRequest{
ClientKey: c.key,
ClientId: c.id.String(),
DocumentKey: doc.Key().String(),
DocumentId: attachment.docID.String(),
Expand Down Expand Up @@ -600,6 +604,7 @@ func (c *Client) pushPullChanges(ctx context.Context, opt SyncOptions) error {
res, err := c.client.PushPullChanges(
withShardKey(ctx, c.options.APIKey, opt.key.String()),
&api.PushPullChangesRequest{
ClientKey: c.key,
ClientId: c.id.String(),
DocumentId: attachment.docID.String(),
ChangePack: pbChangePack,
Expand Down Expand Up @@ -645,6 +650,7 @@ func (c *Client) Remove(ctx context.Context, doc *document.Document) error {
res, err := c.client.RemoveDocument(
withShardKey(ctx, c.options.APIKey, doc.Key().String()),
&api.RemoveDocumentRequest{
ClientKey: c.key,
ClientId: c.id.String(),
DocumentId: attachment.docID.String(),
ChangePack: pbChangePack,
Expand Down Expand Up @@ -682,6 +688,7 @@ func (c *Client) broadcast(ctx context.Context, doc *document.Document, topic st
_, err := c.client.Broadcast(
withShardKey(ctx, c.options.APIKey, doc.Key().String()),
&api.BroadcastRequest{
ClientKey: c.key,
ClientId: c.id.String(),
DocumentKey: doc.Key().String(),
DocumentId: attachment.docID.String(),
Expand Down
6 changes: 3 additions & 3 deletions server/backend/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ type Database interface {
ActivateClient(ctx context.Context, projectID types.ID, key string) (*ClientInfo, error)

// DeactivateClient deactivates the client of the given ID.
DeactivateClient(ctx context.Context, projectID, clientID types.ID) (*ClientInfo, error)
DeactivateClient(ctx context.Context, clientKey string, clientID types.ID) (*ClientInfo, error)

// FindClientInfoByID finds the client of the given ID.
FindClientInfoByID(ctx context.Context, projectID, clientID types.ID) (*ClientInfo, error)
// FindClientInfoByKeyAndID finds the client of the given ID.
FindClientInfoByKeyAndID(ctx context.Context, clientKey string, clientID types.ID) (*ClientInfo, error)

// UpdateClientInfoAfterPushPull updates the client from the given clientInfo
// after handling PushPull.
Expand Down
54 changes: 36 additions & 18 deletions server/backend/database/memory/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,27 +442,33 @@ func (d *DB) ActivateClient(
}

// DeactivateClient deactivates a client.
func (d *DB) DeactivateClient(_ context.Context, projectID, clientID types.ID) (*database.ClientInfo, error) {
func (d *DB) DeactivateClient(
_ context.Context,
clientKey string,
clientID types.ID,
) (*database.ClientInfo, error) {
if err := clientID.Validate(); err != nil {
return nil, err
}

txn := d.db.Txn(true)
defer txn.Abort()

raw, err := txn.First(tblClients, "id", clientID.String())
raw, err := txn.First(
tblClients,
"key_id",
clientKey,
clientID.String(),
)
if err != nil {
return nil, fmt.Errorf("find client by id: %w", err)
return nil, fmt.Errorf("find client by key and id: %w", err)
}

if raw == nil {
return nil, fmt.Errorf("%s: %w", clientID, database.ErrClientNotFound)
}

clientInfo := raw.(*database.ClientInfo)
if err := clientInfo.CheckIfInProject(projectID); err != nil {
return nil, err
}

// NOTE(hackerwins): When retrieving objects from go-memdb, references to
// the stored objects are returned instead of new objects. This can cause
Expand All @@ -477,28 +483,33 @@ func (d *DB) DeactivateClient(_ context.Context, projectID, clientID types.ID) (
return clientInfo, nil
}

// FindClientInfoByID finds a client by ID.
func (d *DB) FindClientInfoByID(_ context.Context, projectID, clientID types.ID) (*database.ClientInfo, error) {
// FindClientInfoByKeyAndID finds a client by the given key and ID.
func (d *DB) FindClientInfoByKeyAndID(
_ context.Context,
clientKey string,
clientID types.ID,
) (*database.ClientInfo, error) {
if err := clientID.Validate(); err != nil {
return nil, err
}

txn := d.db.Txn(false)
defer txn.Abort()

raw, err := txn.First(tblClients, "id", clientID.String())
raw, err := txn.First(
tblClients,
"key_id",
clientKey,
clientID.String(),
)
if err != nil {
return nil, fmt.Errorf("find client by id: %w", err)
return nil, fmt.Errorf("find client by key and id: %w", err)
}
if raw == nil {
return nil, fmt.Errorf("%s: %w", clientID, database.ErrClientNotFound)
}

clientInfo := raw.(*database.ClientInfo)
if err := clientInfo.CheckIfInProject(projectID); err != nil {
return nil, err
}

return clientInfo.DeepCopy(), nil
}

Expand All @@ -518,9 +529,14 @@ func (d *DB) UpdateClientInfoAfterPushPull(
txn := d.db.Txn(true)
defer txn.Abort()

raw, err := txn.First(tblClients, "id", clientInfo.ID.String())
raw, err := txn.First(
tblClients,
"key_id",
clientInfo.Key,
clientInfo.ID.String(),
)
if err != nil {
return fmt.Errorf("find client by id: %w", err)
return fmt.Errorf("find client by key and id: %w", err)
}
if raw == nil {
return fmt.Errorf("%s: %w", clientInfo.ID, database.ErrClientNotFound)
Expand Down Expand Up @@ -1171,9 +1187,10 @@ func (d *DB) UpdateSyncedSeq(
if !isAttached {
if _, err = txn.DeleteAll(
tblSyncedSeqs,
"doc_key_doc_id_client_id",
"doc_key_doc_id_client_key_client_id",
docKey.String(),
docID.String(),
clientInfo.Key,
clientInfo.ID.String(),
); err != nil {
return fmt.Errorf("delete syncedseqs of the document (%s.%s): %w",
Expand All @@ -1190,9 +1207,10 @@ func (d *DB) UpdateSyncedSeq(

raw, err := txn.First(
tblSyncedSeqs,
"doc_key_doc_id_client_id",
"doc_key_doc_id_client_key_client_id",
docKey.String(),
docID.String(),
clientInfo.Key,
clientInfo.ID.String(),
)
if err != nil {
Expand Down
15 changes: 13 additions & 2 deletions server/backend/database/memory/indexes.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@ var schema = &memdb.DBSchema{
Unique: true,
Indexer: &memdb.StringFieldIndex{Field: "ID"},
},
"key_id": {
Name: "key_id",
Unique: true,
Indexer: &memdb.CompoundIndex{
Indexes: []memdb.Indexer{
&memdb.StringFieldIndex{Field: "Key"},
&memdb.StringFieldIndex{Field: "ID"},
},
},
},
"project_id": {
Name: "project_id",
Indexer: &memdb.StringFieldIndex{Field: "ProjectID"},
Expand Down Expand Up @@ -207,13 +217,14 @@ var schema = &memdb.DBSchema{
Unique: true,
Indexer: &memdb.StringFieldIndex{Field: "ID"},
},
"doc_key_doc_id_client_id": {
Name: "doc_key_doc_id_client_id",
"doc_key_doc_id_client_key_client_id": {
Name: "doc_key_doc_id_client_key_client_id",
Unique: true,
Indexer: &memdb.CompoundIndex{
Indexes: []memdb.Indexer{
&memdb.StringFieldIndex{Field: "DocKey"},
&memdb.StringFieldIndex{Field: "DocID"},
&memdb.StringFieldIndex{Field: "ClientKey"},
&memdb.StringFieldIndex{Field: "ClientID"},
},
},
Expand Down
Loading

1 comment on commit 81bebc4

@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: 81bebc4 Previous: 3acd623 Ratio
BenchmarkDocument/constructor_test - ns/op 1340 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.9 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 6977 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 15979 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 21851 ns/op 22198 ns/op 0.98
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 8239 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 34736 ns/op 29641 ns/op 1.17
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 30418 ns/op 31320 ns/op 0.97
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 28343 ns/op 29237 ns/op 0.97
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 80721 ns/op 82849 ns/op 0.97
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 16541 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 2863552 ns/op 2985130 ns/op 0.96
BenchmarkDocument/text_edit_gc_100 - B/op 1655199 B/op 1655239 B/op 1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op 17091 allocs/op 17092 allocs/op 1.00
BenchmarkDocument/text_edit_gc_1000 - ns/op 229176460 ns/op 234174280 ns/op 0.98
BenchmarkDocument/text_edit_gc_1000 - B/op 144355809 B/op 144368132 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 200957 allocs/op 201011 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 - ns/op 3392513 ns/op 3436736 ns/op 0.99
BenchmarkDocument/text_split_gc_100 - B/op 2313953 B/op 2313433 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 16196 allocs/op 16193 allocs/op 1.00
BenchmarkDocument/text_split_gc_1000 - ns/op 288441486 ns/op 292485836 ns/op 0.99
BenchmarkDocument/text_split_gc_1000 - B/op 228899628 B/op 228890592 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 203981 allocs/op 203938 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 - ns/op 11078876 ns/op 11958204 ns/op 0.93
BenchmarkDocument/text_delete_all_10000 - B/op 5810895 B/op 5811760 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 40676 allocs/op 40681 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 - ns/op 215328651 ns/op 192054829 ns/op 1.12
BenchmarkDocument/text_delete_all_100000 - B/op 81885301 B/op 81904042 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 411559 allocs/op 411636 allocs/op 1.00
BenchmarkDocument/text_100 - ns/op 217652 ns/op 233920 ns/op 0.93
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 2452789 ns/op 2472786 ns/op 0.99
BenchmarkDocument/text_1000 - B/op 1153069 B/op 1153071 B/op 1.00
BenchmarkDocument/text_1000 - allocs/op 50084 allocs/op 50084 allocs/op 1
BenchmarkDocument/array_1000 - ns/op 1183737 ns/op 1226516 ns/op 0.97
BenchmarkDocument/array_1000 - B/op 1091298 B/op 1091288 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11826 allocs/op 11826 allocs/op 1
BenchmarkDocument/array_10000 - ns/op 13259770 ns/op 13448793 ns/op 0.99
BenchmarkDocument/array_10000 - B/op 9799976 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 147837 ns/op 153630 ns/op 0.96
BenchmarkDocument/array_gc_100 - B/op 132496 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 1394451 ns/op 1430382 ns/op 0.97
BenchmarkDocument/array_gc_1000 - B/op 1158914 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 203713 ns/op 212571 ns/op 0.96
BenchmarkDocument/counter_1000 - B/op 192851 B/op 192851 B/op 1
BenchmarkDocument/counter_1000 - allocs/op 5765 allocs/op 5765 allocs/op 1
BenchmarkDocument/counter_10000 - ns/op 2187971 ns/op 2224184 ns/op 0.98
BenchmarkDocument/counter_10000 - B/op 2087766 B/op 2087765 B/op 1.00
BenchmarkDocument/counter_10000 - allocs/op 59772 allocs/op 59772 allocs/op 1
BenchmarkDocument/object_1000 - ns/op 1349493 ns/op 1424367 ns/op 0.95
BenchmarkDocument/object_1000 - B/op 1428220 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 14779626 ns/op 14642658 ns/op 1.01
BenchmarkDocument/object_10000 - B/op 12165431 B/op 12167843 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 100558 allocs/op 100562 allocs/op 1.00
BenchmarkDocument/tree_100 - ns/op 685782 ns/op 744469 ns/op 0.92
BenchmarkDocument/tree_100 - B/op 442885 B/op 442890 B/op 1.00
BenchmarkDocument/tree_100 - allocs/op 4506 allocs/op 4506 allocs/op 1
BenchmarkDocument/tree_1000 - ns/op 47347718 ns/op 50380066 ns/op 0.94
BenchmarkDocument/tree_1000 - B/op 35222831 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 6172779582 ns/op 6537517333 ns/op 0.94
BenchmarkDocument/tree_10000 - B/op 3439183536 B/op 3438881024 B/op 1.00
BenchmarkDocument/tree_10000 - allocs/op 440191 allocs/op 440197 allocs/op 1.00
BenchmarkDocument/tree_delete_all_1000 - ns/op 47010507 ns/op 50383873 ns/op 0.93
BenchmarkDocument/tree_delete_all_1000 - B/op 35687528 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 2532484 ns/op 2640190 ns/op 0.96
BenchmarkDocument/tree_edit_gc_100 - B/op 2099468 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 187036820 ns/op 203482588 ns/op 0.92
BenchmarkDocument/tree_edit_gc_1000 - B/op 180290998 B/op 180290254 B/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 113345 allocs/op 113352 allocs/op 1.00
BenchmarkDocument/tree_split_gc_100 - ns/op 1868797 ns/op 1956842 ns/op 0.96
BenchmarkDocument/tree_split_gc_100 - B/op 1363448 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 123461215 ns/op 135715287 ns/op 0.91
BenchmarkDocument/tree_split_gc_1000 - B/op 120284968 B/op 120284779 B/op 1.00
BenchmarkDocument/tree_split_gc_1000 - allocs/op 96193 allocs/op 96190 allocs/op 1.00
BenchmarkRPC/client_to_server - ns/op 362522322 ns/op 359703488 ns/op 1.01
BenchmarkRPC/client_to_server - B/op 12492378 B/op 12458544 B/op 1.00
BenchmarkRPC/client_to_server - allocs/op 178372 allocs/op 176321 allocs/op 1.01
BenchmarkRPC/client_to_client_via_server - ns/op 608227848 ns/op 603988013 ns/op 1.01
BenchmarkRPC/client_to_client_via_server - B/op 23175464 B/op 23259432 B/op 1.00
BenchmarkRPC/client_to_client_via_server - allocs/op 334606 allocs/op 331024 allocs/op 1.01
BenchmarkRPC/attach_large_document - ns/op 1243688017 ns/op 1381620656 ns/op 0.90
BenchmarkRPC/attach_large_document - B/op 1819992568 B/op 1820736296 B/op 1.00
BenchmarkRPC/attach_large_document - allocs/op 10966 allocs/op 10374 allocs/op 1.06
BenchmarkRPC/adminCli_to_server - ns/op 503108676 ns/op 506711988 ns/op 0.99
BenchmarkRPC/adminCli_to_server - B/op 20174324 B/op 20155856 B/op 1.00
BenchmarkRPC/adminCli_to_server - allocs/op 318189 allocs/op 317226 allocs/op 1.00
BenchmarkLocker - ns/op 71.19 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 38.78 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 153.7 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 4157887 ns/op 4228009 ns/op 0.98
BenchmarkChange/Push_10_Changes - B/op 147330 B/op 147011 B/op 1.00
BenchmarkChange/Push_10_Changes - allocs/op 1316 allocs/op 1305 allocs/op 1.01
BenchmarkChange/Push_100_Changes - ns/op 15739049 ns/op 15569560 ns/op 1.01
BenchmarkChange/Push_100_Changes - B/op 711190 B/op 714288 B/op 1.00
BenchmarkChange/Push_100_Changes - allocs/op 6866 allocs/op 6857 allocs/op 1.00
BenchmarkChange/Push_1000_Changes - ns/op 123886162 ns/op 122971913 ns/op 1.01
BenchmarkChange/Push_1000_Changes - B/op 6075441 B/op 6319134 B/op 0.96
BenchmarkChange/Push_1000_Changes - allocs/op 64376 allocs/op 64364 allocs/op 1.00
BenchmarkChange/Pull_10_Changes - ns/op 3243826 ns/op 3266944 ns/op 0.99
BenchmarkChange/Pull_10_Changes - B/op 123945 B/op 123436 B/op 1.00
BenchmarkChange/Pull_10_Changes - allocs/op 1016 allocs/op 1006 allocs/op 1.01
BenchmarkChange/Pull_100_Changes - ns/op 5220038 ns/op 5267253 ns/op 0.99
BenchmarkChange/Pull_100_Changes - B/op 326329 B/op 325367 B/op 1.00
BenchmarkChange/Pull_100_Changes - allocs/op 3485 allocs/op 3475 allocs/op 1.00
BenchmarkChange/Pull_1000_Changes - ns/op 10332025 ns/op 10054426 ns/op 1.03
BenchmarkChange/Pull_1000_Changes - B/op 1637043 B/op 1636062 B/op 1.00
BenchmarkChange/Pull_1000_Changes - allocs/op 29846 allocs/op 29837 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - ns/op 19826088 ns/op 19612724 ns/op 1.01
BenchmarkSnapshot/Push_3KB_snapshot - B/op 957263 B/op 947220 B/op 1.01
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op 6876 allocs/op 6862 allocs/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - ns/op 129809089 ns/op 128964020 ns/op 1.01
BenchmarkSnapshot/Push_30KB_snapshot - B/op 6455982 B/op 6446989 B/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op 64189 allocs/op 64177 allocs/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op 7835878 ns/op 7629068 ns/op 1.03
BenchmarkSnapshot/Pull_3KB_snapshot - B/op 1014275 B/op 1013744 B/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op 15504 allocs/op 15499 allocs/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op 16449868 ns/op 16093336 ns/op 1.02
BenchmarkSnapshot/Pull_30KB_snapshot - B/op 7329603 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 6737 ns/op 7126 ns/op 0.95
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 51582 ns/op 55219 ns/op 0.93
BenchmarkSync/memory_sync_100_test - B/op 8650 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 587394 ns/op 440383 ns/op 1.33
BenchmarkSync/memory_sync_1000_test - B/op 74627 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 7195890 ns/op 4564967 ns/op 1.58
BenchmarkSync/memory_sync_10000_test - B/op 753745 B/op 818933 B/op 0.92
BenchmarkSync/memory_sync_10000_test - allocs/op 20500 allocs/op 24458 allocs/op 0.84
BenchmarkTextEditing - ns/op 19411895915 ns/op 19066495451 ns/op 1.02
BenchmarkTextEditing - B/op 9038107008 B/op 9038245440 B/op 1.00
BenchmarkTextEditing - allocs/op 19923992 allocs/op 19924611 allocs/op 1.00

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

Please sign in to comment.