Skip to content

Commit

Permalink
Fix snapshot just return the latestVectorClock not SVM
Browse files Browse the repository at this point in the history
1. Now snapshot save latest vector clock not SVM.
2. Clients build their own SVM using the latest VectorClock in snapshots.
- So client's SVM is not latest state, it doesn't know peer's vector clock. It need more check
- This is due to the overhead of storing and transferring SVMs. #789
  • Loading branch information
highcloud100 committed Feb 12, 2024
1 parent 679cd90 commit f6d9a58
Show file tree
Hide file tree
Showing 18 changed files with 868 additions and 820 deletions.
2 changes: 1 addition & 1 deletion admin/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func (c *Client) ListChangeSummaries(
seq,
snapshotMeta.Msg.Lamport,
snapshotMeta.Msg.Snapshot,
snapshotMeta.Msg.SyncedVectorMap,
snapshotMeta.Msg.LatestVectorClock,
)

if err != nil {
Expand Down
19 changes: 7 additions & 12 deletions api/converter/from_pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,14 @@ func FromChangePack(pbPack *api.ChangePack) (*change.Pack, error) {
return nil, err
}

syncedVectorMap, err := time.NewSyncedVectorMapFromJSON(pbPack.SyncedVectorMap)
if err != nil {
return nil, err
}

return &change.Pack{
DocumentKey: key.Key(pbPack.DocumentKey),
Checkpoint: fromCheckpoint(pbPack.Checkpoint),
Changes: changes,
Snapshot: pbPack.Snapshot,
MinSyncedTicket: minSyncedTicket,
IsRemoved: pbPack.IsRemoved,
SyncedVectorMap: syncedVectorMap,
DocumentKey: key.Key(pbPack.DocumentKey),
Checkpoint: fromCheckpoint(pbPack.Checkpoint),
Changes: changes,
Snapshot: pbPack.Snapshot,
MinSyncedTicket: minSyncedTicket,
IsRemoved: pbPack.IsRemoved,
LatestVectorClock: pbPack.LatestVectorClock,
}, nil
}

Expand Down
226 changes: 113 additions & 113 deletions api/yorkie/v1/admin.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/yorkie/v1/admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ message GetSnapshotMetaRequest {
message GetSnapshotMetaResponse {
bytes snapshot = 1;
int64 lamport = 2 [jstype = JS_STRING];
string synced_vector_map = 3;
string latest_vector_clock = 3;
}

message SearchDocumentsRequest {
Expand Down
1,208 changes: 604 additions & 604 deletions api/yorkie/v1/resources.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/yorkie/v1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ message ChangePack {
repeated Change changes = 4;
TimeTicket min_synced_ticket = 5;
bool is_removed = 6;
string synced_vector_map = 7;
string latest_vector_clock = 7;
}

message Change {
Expand Down
4 changes: 2 additions & 2 deletions pkg/document/change/pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ type Pack struct {
// IsRemoved is a flag that indicates whether the document is removed.
IsRemoved bool

// SyncedVectorMap is SnapShot's synced vector map information.
SyncedVectorMap time.SyncedVectorMap
// LatestVectorClock is the latest vector clock of the document.
LatestVectorClock string
}

// NewPack creates a new instance of Pack.
Expand Down
2 changes: 1 addition & 1 deletion pkg/document/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (d *Document) ApplyChangePack(pack *change.Pack) error {
d.cloneRoot = nil
d.clonePresences = nil
if err := d.doc.applySnapshot(pack.Snapshot, pack.Checkpoint.ServerSeq,
pack.SyncedVectorMap); err != nil {
pack.LatestVectorClock); err != nil {
return err
}
} else {
Expand Down
28 changes: 21 additions & 7 deletions pkg/document/internal_document.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,21 @@ func NewInternalDocumentFromSnapshot(
serverSeq int64,
lamport int64,
snapshot []byte,
syncedVectorMap string,
LatestVectorClock string,
) (*InternalDocument, error) {
obj, presences, err := converter.BytesToSnapshot(snapshot)
if err != nil {
return nil, err
}

svm, err := time.NewSyncedVectorMapFromJSON(syncedVectorMap)
id := change.InitialID.SyncLamport(lamport)

// Create a new instance of SyncedVectorMap from the given LatestVectorClock.
svm, err := time.NewSVMFromLatestVectorClock(LatestVectorClock)
if err != nil {
return nil, err
}

id := change.InitialID.SyncLamport(lamport)

if svm == nil {
svm = time.InitialSyncedVectorMap(id.Lamport())
}
Expand Down Expand Up @@ -163,7 +164,7 @@ func (d *InternalDocument) HasLocalChanges() bool {
func (d *InternalDocument) ApplyChangePack(pack *change.Pack) error {
// 01. Apply remote changes to both the cloneRoot and the document.
if len(pack.Snapshot) > 0 {
if err := d.applySnapshot(pack.Snapshot, pack.Checkpoint.ServerSeq, pack.SyncedVectorMap); err != nil {
if err := d.applySnapshot(pack.Snapshot, pack.Checkpoint.ServerSeq, pack.LatestVectorClock); err != nil {
return err
}
} else {
Expand Down Expand Up @@ -256,17 +257,30 @@ func (d *InternalDocument) RootObject() *crdt.Object {
func (d *InternalDocument) applySnapshot(
snapshot []byte,
serverSeq int64,
syncedVectorMap time.SyncedVectorMap,
syncedVectorMap string,
) error {
rootObj, presences, err := converter.BytesToSnapshot(snapshot)
if err != nil {
return err
}

svm, err := time.NewSVMFromLatestVectorClock(syncedVectorMap)
if err != nil {
return err
}

// Remove the initial actor's vector clock and replace it with the client's vector clock.
// This is because the initial actor's vector clock is used for the snapshot.
initID := time.InitialActorID.String()
delete(svm, d.ActorID().String())
delete(svm[initID], initID)
svm[d.ActorID().String()] = svm[time.InitialActorID.String()]
delete(svm, initID)

d.root = crdt.NewRoot(rootObj)
d.presences = presences
d.changeID = d.changeID.SyncLamport(serverSeq)
d.syncedVectorMap = syncedVectorMap
d.syncedVectorMap = svm

return nil
}
Expand Down
49 changes: 21 additions & 28 deletions pkg/document/time/vector_clock.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,6 @@ func (vc VectorClock) EncodeToString() (string, error) {
return string(bytes), nil
}

// NewSyncedVectorMapFromJSON creates a new instance of SyncedVectorMap.
func NewSyncedVectorMapFromJSON(encodedChange string) (SyncedVectorMap, error) {
if encodedChange == "" {
return nil, nil
}

vc := SyncedVectorMap{}
if err := json.Unmarshal([]byte(encodedChange), &vc); err != nil {
return nil, fmt.Errorf("unmarshal vector clock: %w", err)
}

return vc, nil
}

// EncodeToString encodes the given syncedVectorMap to string.
func (svm SyncedVectorMap) EncodeToString() (string, error) {
if svm == nil {
return "", nil
}

bytes, err := json.Marshal(svm)
if err != nil {
return "", fmt.Errorf("marshal syncedVectorMap to bytes: %w", err)
}

return string(bytes), nil
}

// InitialSyncedVectorMap creates an initial synced vector map.
func InitialSyncedVectorMap(lamport int64) SyncedVectorMap {
actorID := InitialActorID.String()
Expand Down Expand Up @@ -134,3 +106,24 @@ func (svm SyncedVectorMap) ChangeActorID(id *ActorID) {
delete(svm[newID], initID)
delete(svm, initID)
}

// NewSVMFromLatestVectorClock creates a new instance of SyncedVectorMap from the given latestVectorClock.
func NewSVMFromLatestVectorClock(latestVectorClock string) (SyncedVectorMap, error) {
if latestVectorClock == "" {
return nil, nil
}

vc := VectorClock{}
if err := json.Unmarshal([]byte(latestVectorClock), &vc); err != nil {
return nil, fmt.Errorf("unmarshal vector clock: %w", err)
}

svm := SyncedVectorMap{}

for k := range vc {
svm[k] = VectorClock{}
}
svm[InitialActorID.String()] = vc

return svm, nil
}
16 changes: 8 additions & 8 deletions server/backend/database/mongo/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -975,19 +975,19 @@ func (c *Client) CreateSnapshotInfo(
return err
}

syncedVectorMap, err := doc.SyncedVectorMap().EncodeToString()
latestVectorClock, err := doc.SyncedVectorMap()[doc.ActorID().String()].EncodeToString()
if err != nil {
return err
}

if _, err := c.collection(ColSnapshots).InsertOne(ctx, bson.M{
"project_id": docRefKey.ProjectID,
"doc_id": docRefKey.DocID,
"server_seq": doc.Checkpoint().ServerSeq,
"lamport": doc.Lamport(),
"snapshot": snapshot,
"created_at": gotime.Now(),
"synced_vector_map": syncedVectorMap,
"project_id": docRefKey.ProjectID,
"doc_id": docRefKey.DocID,
"server_seq": doc.Checkpoint().ServerSeq,
"lamport": doc.Lamport(),
"snapshot": snapshot,
"created_at": gotime.Now(),
"latest_vector_clock": latestVectorClock,
}); err != nil {
return fmt.Errorf("insert snapshot: %w", err)
}
Expand Down
20 changes: 10 additions & 10 deletions server/backend/database/snapshot_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ type SnapshotInfo struct {
// CreatedAt is the time when the snapshot is created.
CreatedAt time.Time `bson:"created_at"`

// SyncedVectorMap is the synced vector map of the snapshot.
SyncedVectorMap string `bson:"synced_vector_map"`
// LatestVectorClock is the latest vector clock of the snapshot.
LatestVectorClock string `bson:"synced_vector_map"`
}

// DeepCopy returns a deep copy of the SnapshotInfo.
Expand All @@ -56,14 +56,14 @@ func (i *SnapshotInfo) DeepCopy() *SnapshotInfo {
}

return &SnapshotInfo{
ID: i.ID,
ProjectID: i.ProjectID,
DocID: i.DocID,
ServerSeq: i.ServerSeq,
Lamport: i.Lamport,
Snapshot: i.Snapshot,
CreatedAt: i.CreatedAt,
SyncedVectorMap: i.SyncedVectorMap,
ID: i.ID,
ProjectID: i.ProjectID,
DocID: i.DocID,
ServerSeq: i.ServerSeq,
Lamport: i.Lamport,
Snapshot: i.Snapshot,
CreatedAt: i.CreatedAt,
LatestVectorClock: i.LatestVectorClock,
}
}

Expand Down
2 changes: 1 addition & 1 deletion server/packs/packs.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func BuildDocumentForServerSeq(
snapshotInfo.ServerSeq,
snapshotInfo.Lamport,
snapshotInfo.Snapshot,
snapshotInfo.SyncedVectorMap,
snapshotInfo.LatestVectorClock,
)
if err != nil {
return nil, err
Expand Down
13 changes: 2 additions & 11 deletions server/packs/pushpull.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"github.com/yorkie-team/yorkie/api/converter"
"github.com/yorkie-team/yorkie/api/types"
"github.com/yorkie-team/yorkie/pkg/document/change"
"github.com/yorkie-team/yorkie/pkg/document/time"
"github.com/yorkie-team/yorkie/server/backend"
"github.com/yorkie-team/yorkie/server/backend/database"
"github.com/yorkie-team/yorkie/server/logging"
Expand Down Expand Up @@ -157,22 +156,14 @@ func pullSnapshot(
}
}

// Remove the initial actor's vector clock and replace it with the client's vector clock.
// This is because the initial actor's vector clock is used for the snapshot.
initID := time.InitialActorID.String()
delete(doc.SyncedVectorMap(), string(clientInfo.ID))
delete(doc.SyncedVectorMap()[initID], initID)
doc.SyncedVectorMap()[clientInfo.ID.String()] = doc.SyncedVectorMap()[time.InitialActorID.String()]
delete(doc.SyncedVectorMap(), initID)

cpAfterPull := cpAfterPush.NextServerSeq(docInfo.ServerSeq)

snapshot, err := converter.SnapshotToBytes(doc.RootObject(), doc.AllPresences())
if err != nil {
return nil, err
}

syncedVectorMap, err := doc.SyncedVectorMap().EncodeToString()
latestVectorClock, err := doc.SyncedVectorMap()[doc.ActorID().String()].EncodeToString()
if err != nil {
return nil, err
}
Expand All @@ -186,7 +177,7 @@ func pullSnapshot(
cpAfterPull,
)

return NewServerPack(docInfo.Key, cpAfterPull, nil, snapshot, syncedVectorMap), err
return NewServerPack(docInfo.Key, cpAfterPull, nil, snapshot, latestVectorClock), err
}

func pullChangeInfos(
Expand Down
30 changes: 15 additions & 15 deletions server/packs/serverpacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ type ServerPack struct {
// IsRemoved is a flag that indicates whether the document is removed.
IsRemoved bool

// SyncedVectorMap is SnapShot's synced information.
SyncedVectorMap string
// LatestVectorClock is the latest vector clock of the document.
LatestVectorClock string
}

// NewServerPack creates a new instance of ServerPack.
Expand All @@ -60,14 +60,14 @@ func NewServerPack(
cp change.Checkpoint,
changeInfos []*database.ChangeInfo,
snapshot []byte,
syncedVectorMap string,
latestVectorClock string,
) *ServerPack {
return &ServerPack{
DocumentKey: key,
Checkpoint: cp,
ChangeInfos: changeInfos,
Snapshot: snapshot,
SyncedVectorMap: syncedVectorMap,
DocumentKey: key,
Checkpoint: cp,
ChangeInfos: changeInfos,
Snapshot: snapshot,
LatestVectorClock: latestVectorClock,
}
}

Expand Down Expand Up @@ -130,13 +130,13 @@ func (p *ServerPack) ToPBChangePack() (*api.ChangePack, error) {
}

return &api.ChangePack{
DocumentKey: p.DocumentKey.String(),
Checkpoint: converter.ToCheckpoint(p.Checkpoint),
Changes: pbChanges,
Snapshot: p.Snapshot,
MinSyncedTicket: converter.ToTimeTicket(p.MinSyncedTicket),
IsRemoved: p.IsRemoved,
SyncedVectorMap: p.SyncedVectorMap,
DocumentKey: p.DocumentKey.String(),
Checkpoint: converter.ToCheckpoint(p.Checkpoint),
Changes: pbChanges,
Snapshot: p.Snapshot,
MinSyncedTicket: converter.ToTimeTicket(p.MinSyncedTicket),
IsRemoved: p.IsRemoved,
LatestVectorClock: p.LatestVectorClock,
}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion server/packs/snapshots.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func storeSnapshot(
snapshotInfo.ServerSeq,
snapshotInfo.Lamport,
snapshotInfo.Snapshot,
snapshotInfo.SyncedVectorMap,
snapshotInfo.LatestVectorClock,
)
if err != nil {
return err
Expand Down
8 changes: 4 additions & 4 deletions server/rpc/admin_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,15 @@ func (s *adminServer) GetSnapshotMeta(
return nil, err
}

syncedVectorMap, err := doc.SyncedVectorMap().EncodeToString()
latestVectorClock, err := doc.SyncedVectorMap()[doc.ActorID().String()].EncodeToString()
if err != nil {
return nil, err
}

return connect.NewResponse(&api.GetSnapshotMetaResponse{
Lamport: doc.Lamport(),
Snapshot: snapshot,
SyncedVectorMap: syncedVectorMap,
Lamport: doc.Lamport(),
Snapshot: snapshot,
LatestVectorClock: latestVectorClock,
}), nil
}

Expand Down
Loading

1 comment on commit f6d9a58

@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: f6d9a58 Previous: efaa26a Ratio
BenchmarkDocument/constructor_test 1685 ns/op 1736 B/op 25 allocs/op 1731 ns/op 1736 B/op 25 allocs/op 0.97
BenchmarkDocument/constructor_test - ns/op 1685 ns/op 1731 ns/op 0.97
BenchmarkDocument/constructor_test - B/op 1736 B/op 1736 B/op 1
BenchmarkDocument/constructor_test - allocs/op 25 allocs/op 25 allocs/op 1
BenchmarkDocument/status_test 1094 ns/op 1704 B/op 23 allocs/op 1108 ns/op 1704 B/op 23 allocs/op 0.99
BenchmarkDocument/status_test - ns/op 1094 ns/op 1108 ns/op 0.99
BenchmarkDocument/status_test - B/op 1704 B/op 1704 B/op 1
BenchmarkDocument/status_test - allocs/op 23 allocs/op 23 allocs/op 1
BenchmarkDocument/equals_test 8643 ns/op 9058 B/op 140 allocs/op 8507 ns/op 8802 B/op 138 allocs/op 1.02
BenchmarkDocument/equals_test - ns/op 8643 ns/op 8507 ns/op 1.02
BenchmarkDocument/equals_test - B/op 9058 B/op 8802 B/op 1.03
BenchmarkDocument/equals_test - allocs/op 140 allocs/op 138 allocs/op 1.01
BenchmarkDocument/nested_update_test 19787 ns/op 13115 B/op 268 allocs/op 17379 ns/op 12859 B/op 266 allocs/op 1.14
BenchmarkDocument/nested_update_test - ns/op 19787 ns/op 17379 ns/op 1.14
BenchmarkDocument/nested_update_test - B/op 13115 B/op 12859 B/op 1.02
BenchmarkDocument/nested_update_test - allocs/op 268 allocs/op 266 allocs/op 1.01
BenchmarkDocument/delete_test 23860 ns/op 16884 B/op 351 allocs/op 23558 ns/op 16372 B/op 347 allocs/op 1.01
BenchmarkDocument/delete_test - ns/op 23860 ns/op 23558 ns/op 1.01
BenchmarkDocument/delete_test - B/op 16884 B/op 16372 B/op 1.03
BenchmarkDocument/delete_test - allocs/op 351 allocs/op 347 allocs/op 1.01
BenchmarkDocument/object_test 9284 ns/op 7809 B/op 126 allocs/op 9374 ns/op 7553 B/op 124 allocs/op 0.99
BenchmarkDocument/object_test - ns/op 9284 ns/op 9374 ns/op 0.99
BenchmarkDocument/object_test - B/op 7809 B/op 7553 B/op 1.03
BenchmarkDocument/object_test - allocs/op 126 allocs/op 124 allocs/op 1.02
BenchmarkDocument/array_test 30725 ns/op 12939 B/op 282 allocs/op 31832 ns/op 12683 B/op 280 allocs/op 0.97
BenchmarkDocument/array_test - ns/op 30725 ns/op 31832 ns/op 0.97
BenchmarkDocument/array_test - B/op 12939 B/op 12683 B/op 1.02
BenchmarkDocument/array_test - allocs/op 282 allocs/op 280 allocs/op 1.01
BenchmarkDocument/text_test 31678 ns/op 15636 B/op 474 allocs/op 30990 ns/op 15379 B/op 472 allocs/op 1.02
BenchmarkDocument/text_test - ns/op 31678 ns/op 30990 ns/op 1.02
BenchmarkDocument/text_test - B/op 15636 B/op 15379 B/op 1.02
BenchmarkDocument/text_test - allocs/op 474 allocs/op 472 allocs/op 1.00
BenchmarkDocument/text_composition_test 28985 ns/op 17246 B/op 467 allocs/op 28351 ns/op 16988 B/op 465 allocs/op 1.02
BenchmarkDocument/text_composition_test - ns/op 28985 ns/op 28351 ns/op 1.02
BenchmarkDocument/text_composition_test - B/op 17246 B/op 16988 B/op 1.02
BenchmarkDocument/text_composition_test - allocs/op 467 allocs/op 465 allocs/op 1.00
BenchmarkDocument/rich_text_test 82930 ns/op 41205 B/op 1165 allocs/op 81357 ns/op 39930 B/op 1155 allocs/op 1.02
BenchmarkDocument/rich_text_test - ns/op 82930 ns/op 81357 ns/op 1.02
BenchmarkDocument/rich_text_test - B/op 41205 B/op 39930 B/op 1.03
BenchmarkDocument/rich_text_test - allocs/op 1165 allocs/op 1155 allocs/op 1.01
BenchmarkDocument/counter_test 19506 ns/op 13075 B/op 260 allocs/op 18722 ns/op 12307 B/op 254 allocs/op 1.04
BenchmarkDocument/counter_test - ns/op 19506 ns/op 18722 ns/op 1.04
BenchmarkDocument/counter_test - B/op 13075 B/op 12307 B/op 1.06
BenchmarkDocument/counter_test - allocs/op 260 allocs/op 254 allocs/op 1.02
BenchmarkDocument/text_edit_gc_100 2772899 ns/op 1600479 B/op 16514 allocs/op 2657652 ns/op 1599086 B/op 16505 allocs/op 1.04
BenchmarkDocument/text_edit_gc_100 - ns/op 2772899 ns/op 2657652 ns/op 1.04
BenchmarkDocument/text_edit_gc_100 - B/op 1600479 B/op 1599086 B/op 1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op 16514 allocs/op 16505 allocs/op 1.00
BenchmarkDocument/text_edit_gc_1000 222572927 ns/op 143771638 B/op 194913 allocs/op 210847810 ns/op 143753280 B/op 194863 allocs/op 1.06
BenchmarkDocument/text_edit_gc_1000 - ns/op 222572927 ns/op 210847810 ns/op 1.06
BenchmarkDocument/text_edit_gc_1000 - B/op 143771638 B/op 143753280 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 194913 allocs/op 194863 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 3266230 ns/op 2268174 B/op 15813 allocs/op 3235076 ns/op 2266793 B/op 15804 allocs/op 1.01
BenchmarkDocument/text_split_gc_100 - ns/op 3266230 ns/op 3235076 ns/op 1.01
BenchmarkDocument/text_split_gc_100 - B/op 2268174 B/op 2266793 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 15813 allocs/op 15804 allocs/op 1.00
BenchmarkDocument/text_split_gc_1000 282635117 ns/op 228408568 B/op 199940 allocs/op 276114936 ns/op 228405324 B/op 199938 allocs/op 1.02
BenchmarkDocument/text_split_gc_1000 - ns/op 282635117 ns/op 276114936 ns/op 1.02
BenchmarkDocument/text_split_gc_1000 - B/op 228408568 B/op 228405324 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 199940 allocs/op 199938 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 10397275 ns/op 5809971 B/op 40672 allocs/op 10840669 ns/op 5812428 B/op 40675 allocs/op 0.96
BenchmarkDocument/text_delete_all_10000 - ns/op 10397275 ns/op 10840669 ns/op 0.96
BenchmarkDocument/text_delete_all_10000 - B/op 5809971 B/op 5812428 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 40672 allocs/op 40675 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 186081033 ns/op 81889386 B/op 411565 allocs/op 175131809 ns/op 81894325 B/op 411601 allocs/op 1.06
BenchmarkDocument/text_delete_all_100000 - ns/op 186081033 ns/op 175131809 ns/op 1.06
BenchmarkDocument/text_delete_all_100000 - B/op 81889386 B/op 81894325 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 411565 allocs/op 411601 allocs/op 1.00
BenchmarkDocument/text_100 218900 ns/op 111595 B/op 4890 allocs/op 214967 ns/op 111339 B/op 4888 allocs/op 1.02
BenchmarkDocument/text_100 - ns/op 218900 ns/op 214967 ns/op 1.02
BenchmarkDocument/text_100 - B/op 111595 B/op 111339 B/op 1.00
BenchmarkDocument/text_100 - allocs/op 4890 allocs/op 4888 allocs/op 1.00
BenchmarkDocument/text_1000 2368864 ns/op 1074180 B/op 48094 allocs/op 2305021 ns/op 1073907 B/op 48092 allocs/op 1.03
BenchmarkDocument/text_1000 - ns/op 2368864 ns/op 2305021 ns/op 1.03
BenchmarkDocument/text_1000 - B/op 1074180 B/op 1073907 B/op 1.00
BenchmarkDocument/text_1000 - allocs/op 48094 allocs/op 48092 allocs/op 1.00
BenchmarkDocument/array_1000 1217672 ns/op 1092407 B/op 11838 allocs/op 1196795 ns/op 1092063 B/op 11835 allocs/op 1.02
BenchmarkDocument/array_1000 - ns/op 1217672 ns/op 1196795 ns/op 1.02
BenchmarkDocument/array_1000 - B/op 1092407 B/op 1092063 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11838 allocs/op 11835 allocs/op 1.00
BenchmarkDocument/array_10000 13558070 ns/op 9800495 B/op 120300 allocs/op 13172087 ns/op 9799899 B/op 120297 allocs/op 1.03
BenchmarkDocument/array_10000 - ns/op 13558070 ns/op 13172087 ns/op 1.03
BenchmarkDocument/array_10000 - B/op 9800495 B/op 9799899 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120300 allocs/op 120297 allocs/op 1.00
BenchmarkDocument/array_gc_100 147283 ns/op 135286 B/op 1278 allocs/op 148597 ns/op 133991 B/op 1268 allocs/op 0.99
BenchmarkDocument/array_gc_100 - ns/op 147283 ns/op 148597 ns/op 0.99
BenchmarkDocument/array_gc_100 - B/op 135286 B/op 133991 B/op 1.01
BenchmarkDocument/array_gc_100 - allocs/op 1278 allocs/op 1268 allocs/op 1.01
BenchmarkDocument/array_gc_1000 1382778 ns/op 1161711 B/op 12894 allocs/op 1397472 ns/op 1160462 B/op 12885 allocs/op 0.99
BenchmarkDocument/array_gc_1000 - ns/op 1382778 ns/op 1397472 ns/op 0.99
BenchmarkDocument/array_gc_1000 - B/op 1161711 B/op 1160462 B/op 1.00
BenchmarkDocument/array_gc_1000 - allocs/op 12894 allocs/op 12885 allocs/op 1.00
BenchmarkDocument/counter_1000 199142 ns/op 194069 B/op 5777 allocs/op 209647 ns/op 193813 B/op 5775 allocs/op 0.95
BenchmarkDocument/counter_1000 - ns/op 199142 ns/op 209647 ns/op 0.95
BenchmarkDocument/counter_1000 - B/op 194069 B/op 193813 B/op 1.00
BenchmarkDocument/counter_1000 - allocs/op 5777 allocs/op 5775 allocs/op 1.00
BenchmarkDocument/counter_10000 2174059 ns/op 2088983 B/op 59784 allocs/op 2172253 ns/op 2088743 B/op 59782 allocs/op 1.00
BenchmarkDocument/counter_10000 - ns/op 2174059 ns/op 2172253 ns/op 1.00
BenchmarkDocument/counter_10000 - B/op 2088983 B/op 2088743 B/op 1.00
BenchmarkDocument/counter_10000 - allocs/op 59784 allocs/op 59782 allocs/op 1.00
BenchmarkDocument/object_1000 1353162 ns/op 1428941 B/op 9854 allocs/op 1356990 ns/op 1428733 B/op 9852 allocs/op 1.00
BenchmarkDocument/object_1000 - ns/op 1353162 ns/op 1356990 ns/op 1.00
BenchmarkDocument/object_1000 - B/op 1428941 B/op 1428733 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9854 allocs/op 9852 allocs/op 1.00
BenchmarkDocument/object_10000 14960401 ns/op 12168019 B/op 100572 allocs/op 15229983 ns/op 12167368 B/op 100568 allocs/op 0.98
BenchmarkDocument/object_10000 - ns/op 14960401 ns/op 15229983 ns/op 0.98
BenchmarkDocument/object_10000 - B/op 12168019 B/op 12167368 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 100572 allocs/op 100568 allocs/op 1.00
BenchmarkDocument/tree_100 1007893 ns/op 944842 B/op 6110 allocs/op 1036123 ns/op 944588 B/op 6108 allocs/op 0.97
BenchmarkDocument/tree_100 - ns/op 1007893 ns/op 1036123 ns/op 0.97
BenchmarkDocument/tree_100 - B/op 944842 B/op 944588 B/op 1.00
BenchmarkDocument/tree_100 - allocs/op 6110 allocs/op 6108 allocs/op 1.00
BenchmarkDocument/tree_1000 71985683 ns/op 86461498 B/op 60125 allocs/op 75368121 ns/op 86461192 B/op 60122 allocs/op 0.96
BenchmarkDocument/tree_1000 - ns/op 71985683 ns/op 75368121 ns/op 0.96
BenchmarkDocument/tree_1000 - B/op 86461498 B/op 86461192 B/op 1.00
BenchmarkDocument/tree_1000 - allocs/op 60125 allocs/op 60122 allocs/op 1.00
BenchmarkDocument/tree_10000 9396890213 ns/op 8580982736 B/op 600238 allocs/op 9418387916 ns/op 8580665120 B/op 600243 allocs/op 1.00
BenchmarkDocument/tree_10000 - ns/op 9396890213 ns/op 9418387916 ns/op 1.00
BenchmarkDocument/tree_10000 - B/op 8580982736 B/op 8580665120 B/op 1.00
BenchmarkDocument/tree_10000 - allocs/op 600238 allocs/op 600243 allocs/op 1.00
BenchmarkDocument/tree_delete_all_1000 72488146 ns/op 86992492 B/op 67766 allocs/op 73474639 ns/op 87012722 B/op 67760 allocs/op 0.99
BenchmarkDocument/tree_delete_all_1000 - ns/op 72488146 ns/op 73474639 ns/op 0.99
BenchmarkDocument/tree_delete_all_1000 - B/op 86992492 B/op 87012722 B/op 1.00
BenchmarkDocument/tree_delete_all_1000 - allocs/op 67766 allocs/op 67760 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_100 3643617 ns/op 4123736 B/op 14379 allocs/op 3652525 ns/op 4122469 B/op 14369 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_100 - ns/op 3643617 ns/op 3652525 ns/op 1.00
BenchmarkDocument/tree_edit_gc_100 - B/op 4123736 B/op 4122469 B/op 1.00
BenchmarkDocument/tree_edit_gc_100 - allocs/op 14379 allocs/op 14369 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_1000 293449682 ns/op 383469106 B/op 145432 allocs/op 297703694 ns/op 383468532 B/op 145427 allocs/op 0.99
BenchmarkDocument/tree_edit_gc_1000 - ns/op 293449682 ns/op 297703694 ns/op 0.99
BenchmarkDocument/tree_edit_gc_1000 - B/op 383469106 B/op 383468532 B/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 145432 allocs/op 145427 allocs/op 1.00
BenchmarkDocument/tree_split_gc_100 2428094 ns/op 2389547 B/op 10363 allocs/op 2432465 ns/op 2388247 B/op 10353 allocs/op 1.00
BenchmarkDocument/tree_split_gc_100 - ns/op 2428094 ns/op 2432465 ns/op 1.00
BenchmarkDocument/tree_split_gc_100 - B/op 2389547 B/op 2388247 B/op 1.00
BenchmarkDocument/tree_split_gc_100 - allocs/op 10363 allocs/op 10353 allocs/op 1.00
BenchmarkDocument/tree_split_gc_1000 177549323 ns/op 221994650 B/op 112273 allocs/op 181457229 ns/op 221993197 B/op 112272 allocs/op 0.98
BenchmarkDocument/tree_split_gc_1000 - ns/op 177549323 ns/op 181457229 ns/op 0.98
BenchmarkDocument/tree_split_gc_1000 - B/op 221994650 B/op 221993197 B/op 1.00
BenchmarkDocument/tree_split_gc_1000 - allocs/op 112273 allocs/op 112272 allocs/op 1.00
BenchmarkRPC/client_to_server 373550315 ns/op 18104192 B/op 181133 allocs/op 372139808 ns/op 17272722 B/op 184669 allocs/op 1.00
BenchmarkRPC/client_to_server - ns/op 373550315 ns/op 372139808 ns/op 1.00
BenchmarkRPC/client_to_server - B/op 18104192 B/op 17272722 B/op 1.05
BenchmarkRPC/client_to_server - allocs/op 181133 allocs/op 184669 allocs/op 0.98
BenchmarkRPC/client_to_client_via_server 639917984 ns/op 33507740 B/op 365880 allocs/op 636739050 ns/op 36639356 B/op 366581 allocs/op 1.00
BenchmarkRPC/client_to_client_via_server - ns/op 639917984 ns/op 636739050 ns/op 1.00
BenchmarkRPC/client_to_client_via_server - B/op 33507740 B/op 36639356 B/op 0.91
BenchmarkRPC/client_to_client_via_server - allocs/op 365880 allocs/op 366581 allocs/op 1.00
BenchmarkRPC/attach_large_document 1210244373 ns/op 1905008032 B/op 7816 allocs/op 1142842726 ns/op 1915472584 B/op 7807 allocs/op 1.06
BenchmarkRPC/attach_large_document - ns/op 1210244373 ns/op 1142842726 ns/op 1.06
BenchmarkRPC/attach_large_document - B/op 1905008032 B/op 1915472584 B/op 0.99
BenchmarkRPC/attach_large_document - allocs/op 7816 allocs/op 7807 allocs/op 1.00
BenchmarkRPC/adminCli_to_server 545516430 ns/op 35980556 B/op 289694 allocs/op 539712888 ns/op 35982552 B/op 289650 allocs/op 1.01
BenchmarkRPC/adminCli_to_server - ns/op 545516430 ns/op 539712888 ns/op 1.01
BenchmarkRPC/adminCli_to_server - B/op 35980556 B/op 35982552 B/op 1.00
BenchmarkRPC/adminCli_to_server - allocs/op 289694 allocs/op 289650 allocs/op 1.00
BenchmarkLocker 64.9 ns/op 16 B/op 1 allocs/op 65.04 ns/op 16 B/op 1 allocs/op 1.00
BenchmarkLocker - ns/op 64.9 ns/op 65.04 ns/op 1.00
BenchmarkLocker - B/op 16 B/op 16 B/op 1
BenchmarkLocker - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkLockerParallel 39.13 ns/op 0 B/op 0 allocs/op 38.47 ns/op 0 B/op 0 allocs/op 1.02
BenchmarkLockerParallel - ns/op 39.13 ns/op 38.47 ns/op 1.02
BenchmarkLockerParallel - B/op 0 B/op 0 B/op 1
BenchmarkLockerParallel - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkLockerMoreKeys 147.6 ns/op 15 B/op 0 allocs/op 147.6 ns/op 15 B/op 0 allocs/op 1
BenchmarkLockerMoreKeys - ns/op 147.6 ns/op 147.6 ns/op 1
BenchmarkLockerMoreKeys - B/op 15 B/op 15 B/op 1
BenchmarkLockerMoreKeys - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkChange/Push_10_Changes 3952293 ns/op 133373 B/op 1418 allocs/op 3953554 ns/op 133398 B/op 1396 allocs/op 1.00
BenchmarkChange/Push_10_Changes - ns/op 3952293 ns/op 3953554 ns/op 1.00
BenchmarkChange/Push_10_Changes - B/op 133373 B/op 133398 B/op 1.00
BenchmarkChange/Push_10_Changes - allocs/op 1418 allocs/op 1396 allocs/op 1.02
BenchmarkChange/Push_100_Changes 14922292 ns/op 697632 B/op 7860 allocs/op 14900376 ns/op 692548 B/op 7661 allocs/op 1.00
BenchmarkChange/Push_100_Changes - ns/op 14922292 ns/op 14900376 ns/op 1.00
BenchmarkChange/Push_100_Changes - B/op 697632 B/op 692548 B/op 1.01
BenchmarkChange/Push_100_Changes - allocs/op 7860 allocs/op 7661 allocs/op 1.03
BenchmarkChange/Push_1000_Changes 120253616 ns/op 6787370 B/op 75068 allocs/op 119829952 ns/op 6863530 B/op 73089 allocs/op 1.00
BenchmarkChange/Push_1000_Changes - ns/op 120253616 ns/op 119829952 ns/op 1.00
BenchmarkChange/Push_1000_Changes - B/op 6787370 B/op 6863530 B/op 0.99
BenchmarkChange/Push_1000_Changes - allocs/op 75068 allocs/op 73089 allocs/op 1.03
BenchmarkChange/Pull_10_Changes 2934831 ns/op 103605 B/op 1059 allocs/op 2932114 ns/op 103560 B/op 1048 allocs/op 1.00
BenchmarkChange/Pull_10_Changes - ns/op 2934831 ns/op 2932114 ns/op 1.00
BenchmarkChange/Pull_10_Changes - B/op 103605 B/op 103560 B/op 1.00
BenchmarkChange/Pull_10_Changes - allocs/op 1059 allocs/op 1048 allocs/op 1.01
BenchmarkChange/Pull_100_Changes 4435042 ns/op 285986 B/op 3889 allocs/op 4389593 ns/op 284264 B/op 3790 allocs/op 1.01
BenchmarkChange/Pull_100_Changes - ns/op 4435042 ns/op 4389593 ns/op 1.01
BenchmarkChange/Pull_100_Changes - B/op 285986 B/op 284264 B/op 1.01
BenchmarkChange/Pull_100_Changes - allocs/op 3889 allocs/op 3790 allocs/op 1.03
BenchmarkChange/Pull_1000_Changes 9294164 ns/op 1668663 B/op 33840 allocs/op 9090876 ns/op 1638931 B/op 32847 allocs/op 1.02
BenchmarkChange/Pull_1000_Changes - ns/op 9294164 ns/op 9090876 ns/op 1.02
BenchmarkChange/Pull_1000_Changes - B/op 1668663 B/op 1638931 B/op 1.02
BenchmarkChange/Pull_1000_Changes - allocs/op 33840 allocs/op 32847 allocs/op 1.03
BenchmarkSnapshot/Push_3KB_snapshot 17422080 ns/op 855455 B/op 7867 allocs/op 17441511 ns/op 852949 B/op 7665 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - ns/op 17422080 ns/op 17441511 ns/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - B/op 855455 B/op 852949 B/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op 7867 allocs/op 7665 allocs/op 1.03
BenchmarkSnapshot/Push_30KB_snapshot 124025699 ns/op 7330037 B/op 75529 allocs/op 123659601 ns/op 7184755 B/op 73897 allocs/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - ns/op 124025699 ns/op 123659601 ns/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - B/op 7330037 B/op 7184755 B/op 1.02
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op 75529 allocs/op 73897 allocs/op 1.02
BenchmarkSnapshot/Pull_3KB_snapshot 7000134 ns/op 1084945 B/op 18958 allocs/op 6937333 ns/op 1081638 B/op 18797 allocs/op 1.01
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op 7000134 ns/op 6937333 ns/op 1.01
BenchmarkSnapshot/Pull_3KB_snapshot - B/op 1084945 B/op 1081638 B/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op 18958 allocs/op 18797 allocs/op 1.01
BenchmarkSnapshot/Pull_30KB_snapshot 18687793 ns/op 8720242 B/op 183862 allocs/op 18787602 ns/op 8695436 B/op 181927 allocs/op 0.99
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op 18687793 ns/op 18787602 ns/op 0.99
BenchmarkSnapshot/Pull_30KB_snapshot - B/op 8720242 B/op 8695436 B/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op 183862 allocs/op 181927 allocs/op 1.01
BenchmarkSync/memory_sync_10_test 6964 ns/op 1286 B/op 38 allocs/op 6783 ns/op 1286 B/op 38 allocs/op 1.03
BenchmarkSync/memory_sync_10_test - ns/op 6964 ns/op 6783 ns/op 1.03
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 52685 ns/op 8640 B/op 273 allocs/op 51914 ns/op 8645 B/op 273 allocs/op 1.01
BenchmarkSync/memory_sync_100_test - ns/op 52685 ns/op 51914 ns/op 1.01
BenchmarkSync/memory_sync_100_test - B/op 8640 B/op 8645 B/op 1.00
BenchmarkSync/memory_sync_100_test - allocs/op 273 allocs/op 273 allocs/op 1
BenchmarkSync/memory_sync_1000_test 600765 ns/op 74376 B/op 2111 allocs/op 585327 ns/op 74647 B/op 2125 allocs/op 1.03
BenchmarkSync/memory_sync_1000_test - ns/op 600765 ns/op 585327 ns/op 1.03
BenchmarkSync/memory_sync_1000_test - B/op 74376 B/op 74647 B/op 1.00
BenchmarkSync/memory_sync_1000_test - allocs/op 2111 allocs/op 2125 allocs/op 0.99
BenchmarkSync/memory_sync_10000_test 7544744 ns/op 757820 B/op 20476 allocs/op 7549162 ns/op 758006 B/op 20480 allocs/op 1.00
BenchmarkSync/memory_sync_10000_test - ns/op 7544744 ns/op 7549162 ns/op 1.00
BenchmarkSync/memory_sync_10000_test - B/op 757820 B/op 758006 B/op 1.00
BenchmarkSync/memory_sync_10000_test - allocs/op 20476 allocs/op 20480 allocs/op 1.00
BenchmarkTextEditing 18046349810 ns/op 9126642752 B/op 20287243 allocs/op 17910068127 ns/op 9059821360 B/op 19769032 allocs/op 1.01
BenchmarkTextEditing - ns/op 18046349810 ns/op 17910068127 ns/op 1.01
BenchmarkTextEditing - B/op 9126642752 B/op 9059821360 B/op 1.01
BenchmarkTextEditing - allocs/op 20287243 allocs/op 19769032 allocs/op 1.03

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

Please sign in to comment.