Skip to content

Commit

Permalink
Introduce VersionVector to detect the relationship between changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerwins committed Mar 14, 2024
1 parent eadb194 commit 0667dca
Show file tree
Hide file tree
Showing 24 changed files with 1,598 additions and 1,197 deletions.
6 changes: 6 additions & 0 deletions admin/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,16 @@ func (c *Client) ListChangeSummaries(
return nil, err
}

vector, err := converter.FromVersionVector(snapshotMeta.Msg.VersionVector)
if err != nil {
return nil, err
}

newDoc, err := document.NewInternalDocumentFromSnapshot(
key,
seq,
snapshotMeta.Msg.Lamport,
vector,
snapshotMeta.Msg.Snapshot,
)

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

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

if pbPack.Snapshot != nil {
pack.Snapshot = pbPack.Snapshot
pack.SnapshotVersionVector, err = FromVersionVector(pbPack.SnapshotVersionVector)
if err != nil {
return nil, err
}
}

return pack, nil
}

func fromCheckpoint(pbCheckpoint *api.Checkpoint) change.Checkpoint {
Expand Down Expand Up @@ -147,14 +156,41 @@ func fromChangeID(id *api.ChangeID) (change.ID, error) {
if err != nil {
return change.InitialID, err
}

vector, err := FromVersionVector(id.VersionVector)
if err != nil {
return change.InitialID, err
}

return change.NewID(
id.ClientSeq,
id.ServerSeq,
id.Lamport,
actorID,
vector,
), nil
}

// FromVersionVector converts the given Protobuf formats to model format.
func FromVersionVector(pbVersionVector *api.VersionVector) (time.VersionVector, error) {
versionVector := make(time.VersionVector)
// TODO(hackerwins): Old clients until v0.4.15 don't send VersionVector.
// Remove this check after all clients are updated to the v0.4.16 or later.
if pbVersionVector == nil {
return versionVector, nil
}

for id, lamport := range pbVersionVector.Vector {
actorID, err := time.ActorIDFromHex(id)
if err != nil {
return nil, err
}
versionVector.Set(actorID, lamport)
}

return versionVector, nil
}

// FromDocumentID converts the given Protobuf formats to model format.
func FromDocumentID(pbID string) (types.ID, error) {
id := types.ID(pbID)
Expand Down
39 changes: 33 additions & 6 deletions api/converter/to_pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,35 @@ func ToCheckpoint(cp change.Checkpoint) *api.Checkpoint {
}

// ToChangeID converts the given model format to Protobuf format.
func ToChangeID(id change.ID) *api.ChangeID {
func ToChangeID(id change.ID) (*api.ChangeID, error) {
pbVersionVector, err := ToVersionVector(id.VersionVector())
if err != nil {
return nil, err
}
return &api.ChangeID{
ClientSeq: id.ClientSeq(),
ServerSeq: id.ServerSeq(),
Lamport: id.Lamport(),
ActorId: id.ActorID().Bytes(),
ClientSeq: id.ClientSeq(),
ServerSeq: id.ServerSeq(),
Lamport: id.Lamport(),
ActorId: id.ActorID().Bytes(),
VersionVector: pbVersionVector,
}, nil
}

// ToVersionVector converts the given model format to Protobuf format.
func ToVersionVector(vector time.VersionVector) (*api.VersionVector, error) {
pbVersionVector := make(map[string]int64)
for actor, clock := range vector {
id, err := time.ActorIDFromBytes(actor[:])
if err != nil {
return nil, err
}

pbVersionVector[id.String()] = clock
}

return &api.VersionVector{
Vector: pbVersionVector,
}, nil
}

// ToDocEventType converts the given model format to Protobuf format.
Expand Down Expand Up @@ -241,8 +263,13 @@ func ToChanges(changes []*change.Change) ([]*api.Change, error) {
return nil, err
}

pbChangeID, err := ToChangeID(c.ID())
if err != nil {
return nil, err
}

pbChanges = append(pbChanges, &api.Change{
Id: ToChangeID(c.ID()),
Id: pbChangeID,
Message: c.Message(),
Operations: pbOperations,
PresenceChange: ToPresenceChange(c.PresenceChange()),
Expand Down
288 changes: 151 additions & 137 deletions api/yorkie/v1/admin.pb.go

Large diffs are not rendered by default.

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

message SearchDocumentsRequest {
Expand Down
Loading

1 comment on commit 0667dca

@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: 0667dca Previous: ebf8eda Ratio
BenchmarkDocument/constructor_test 1455 ns/op 1224 B/op 21 allocs/op 1459 ns/op 1224 B/op 21 allocs/op 1.00
BenchmarkDocument/constructor_test - ns/op 1455 ns/op 1459 ns/op 1.00
BenchmarkDocument/constructor_test - B/op 1224 B/op 1224 B/op 1
BenchmarkDocument/constructor_test - allocs/op 21 allocs/op 21 allocs/op 1
BenchmarkDocument/status_test 937.5 ns/op 1192 B/op 19 allocs/op 854.6 ns/op 1192 B/op 19 allocs/op 1.10
BenchmarkDocument/status_test - ns/op 937.5 ns/op 854.6 ns/op 1.10
BenchmarkDocument/status_test - B/op 1192 B/op 1192 B/op 1
BenchmarkDocument/status_test - allocs/op 19 allocs/op 19 allocs/op 1
BenchmarkDocument/equals_test 7781 ns/op 7233 B/op 126 allocs/op 7712 ns/op 7233 B/op 126 allocs/op 1.01
BenchmarkDocument/equals_test - ns/op 7781 ns/op 7712 ns/op 1.01
BenchmarkDocument/equals_test - B/op 7233 B/op 7233 B/op 1
BenchmarkDocument/equals_test - allocs/op 126 allocs/op 126 allocs/op 1
BenchmarkDocument/nested_update_test 16966 ns/op 12315 B/op 262 allocs/op 16957 ns/op 12315 B/op 262 allocs/op 1.00
BenchmarkDocument/nested_update_test - ns/op 16966 ns/op 16957 ns/op 1.00
BenchmarkDocument/nested_update_test - B/op 12315 B/op 12315 B/op 1
BenchmarkDocument/nested_update_test - allocs/op 262 allocs/op 262 allocs/op 1
BenchmarkDocument/delete_test 22956 ns/op 15844 B/op 345 allocs/op 23619 ns/op 15844 B/op 345 allocs/op 0.97
BenchmarkDocument/delete_test - ns/op 22956 ns/op 23619 ns/op 0.97
BenchmarkDocument/delete_test - B/op 15844 B/op 15844 B/op 1
BenchmarkDocument/delete_test - allocs/op 345 allocs/op 345 allocs/op 1
BenchmarkDocument/object_test 8685 ns/op 7009 B/op 120 allocs/op 8956 ns/op 7009 B/op 120 allocs/op 0.97
BenchmarkDocument/object_test - ns/op 8685 ns/op 8956 ns/op 0.97
BenchmarkDocument/object_test - B/op 7009 B/op 7009 B/op 1
BenchmarkDocument/object_test - allocs/op 120 allocs/op 120 allocs/op 1
BenchmarkDocument/array_test 29118 ns/op 12139 B/op 276 allocs/op 29298 ns/op 12139 B/op 276 allocs/op 0.99
BenchmarkDocument/array_test - ns/op 29118 ns/op 29298 ns/op 0.99
BenchmarkDocument/array_test - B/op 12139 B/op 12139 B/op 1
BenchmarkDocument/array_test - allocs/op 276 allocs/op 276 allocs/op 1
BenchmarkDocument/text_test 31293 ns/op 15460 B/op 476 allocs/op 35951 ns/op 15460 B/op 476 allocs/op 0.87
BenchmarkDocument/text_test - ns/op 31293 ns/op 35951 ns/op 0.87
BenchmarkDocument/text_test - B/op 15460 B/op 15460 B/op 1
BenchmarkDocument/text_test - allocs/op 476 allocs/op 476 allocs/op 1
BenchmarkDocument/text_composition_test 29337 ns/op 18686 B/op 481 allocs/op 29464 ns/op 18686 B/op 481 allocs/op 1.00
BenchmarkDocument/text_composition_test - ns/op 29337 ns/op 29464 ns/op 1.00
BenchmarkDocument/text_composition_test - B/op 18686 B/op 18686 B/op 1
BenchmarkDocument/text_composition_test - allocs/op 481 allocs/op 481 allocs/op 1
BenchmarkDocument/rich_text_test 82238 ns/op 40149 B/op 1167 allocs/op 82051 ns/op 40148 B/op 1167 allocs/op 1.00
BenchmarkDocument/rich_text_test - ns/op 82238 ns/op 82051 ns/op 1.00
BenchmarkDocument/rich_text_test - B/op 40149 B/op 40148 B/op 1.00
BenchmarkDocument/rich_text_test - allocs/op 1167 allocs/op 1167 allocs/op 1
BenchmarkDocument/counter_test 18587 ns/op 11811 B/op 256 allocs/op 18535 ns/op 11810 B/op 256 allocs/op 1.00
BenchmarkDocument/counter_test - ns/op 18587 ns/op 18535 ns/op 1.00
BenchmarkDocument/counter_test - B/op 11811 B/op 11810 B/op 1.00
BenchmarkDocument/counter_test - allocs/op 256 allocs/op 256 allocs/op 1
BenchmarkDocument/text_edit_gc_100 2929319 ns/op 1659210 B/op 17101 allocs/op 2894445 ns/op 1658988 B/op 17099 allocs/op 1.01
BenchmarkDocument/text_edit_gc_100 - ns/op 2929319 ns/op 2894445 ns/op 1.01
BenchmarkDocument/text_edit_gc_100 - B/op 1659210 B/op 1658988 B/op 1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op 17101 allocs/op 17099 allocs/op 1.00
BenchmarkDocument/text_edit_gc_1000 233518768 ns/op 144382224 B/op 200956 allocs/op 233177014 ns/op 144391686 B/op 200989 allocs/op 1.00
BenchmarkDocument/text_edit_gc_1000 - ns/op 233518768 ns/op 233177014 ns/op 1.00
BenchmarkDocument/text_edit_gc_1000 - B/op 144382224 B/op 144391686 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 200956 allocs/op 200989 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 3430332 ns/op 2317287 B/op 16202 allocs/op 3437271 ns/op 2317485 B/op 16202 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 - ns/op 3430332 ns/op 3437271 ns/op 1.00
BenchmarkDocument/text_split_gc_100 - B/op 2317287 B/op 2317485 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 16202 allocs/op 16202 allocs/op 1
BenchmarkDocument/text_split_gc_1000 293160216 ns/op 228922600 B/op 203954 allocs/op 295656303 ns/op 228932364 B/op 203997 allocs/op 0.99
BenchmarkDocument/text_split_gc_1000 - ns/op 293160216 ns/op 295656303 ns/op 0.99
BenchmarkDocument/text_split_gc_1000 - B/op 228922600 B/op 228932364 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 203954 allocs/op 203997 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 11497459 ns/op 5810972 B/op 40679 allocs/op 11449354 ns/op 5812089 B/op 40676 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 - ns/op 11497459 ns/op 11449354 ns/op 1.00
BenchmarkDocument/text_delete_all_10000 - B/op 5810972 B/op 5812089 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 40679 allocs/op 40676 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 187299954 ns/op 81896957 B/op 411611 allocs/op 198213917 ns/op 81893784 B/op 411589 allocs/op 0.94
BenchmarkDocument/text_delete_all_100000 - ns/op 187299954 ns/op 198213917 ns/op 0.94
BenchmarkDocument/text_delete_all_100000 - B/op 81896957 B/op 81893784 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 411611 allocs/op 411589 allocs/op 1.00
BenchmarkDocument/text_100 219328 ns/op 120395 B/op 5084 allocs/op 223483 ns/op 120393 B/op 5084 allocs/op 0.98
BenchmarkDocument/text_100 - ns/op 219328 ns/op 223483 ns/op 0.98
BenchmarkDocument/text_100 - B/op 120395 B/op 120393 B/op 1.00
BenchmarkDocument/text_100 - allocs/op 5084 allocs/op 5084 allocs/op 1
BenchmarkDocument/text_1000 2391517 ns/op 1169381 B/op 50088 allocs/op 2416354 ns/op 1169380 B/op 50088 allocs/op 0.99
BenchmarkDocument/text_1000 - ns/op 2391517 ns/op 2416354 ns/op 0.99
BenchmarkDocument/text_1000 - B/op 1169381 B/op 1169380 B/op 1.00
BenchmarkDocument/text_1000 - allocs/op 50088 allocs/op 50088 allocs/op 1
BenchmarkDocument/array_1000 1219070 ns/op 1091549 B/op 11831 allocs/op 1208454 ns/op 1091657 B/op 11832 allocs/op 1.01
BenchmarkDocument/array_1000 - ns/op 1219070 ns/op 1208454 ns/op 1.01
BenchmarkDocument/array_1000 - B/op 1091549 B/op 1091657 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11831 allocs/op 11832 allocs/op 1.00
BenchmarkDocument/array_10000 13766569 ns/op 9799706 B/op 120294 allocs/op 13471893 ns/op 9800104 B/op 120296 allocs/op 1.02
BenchmarkDocument/array_10000 - ns/op 13766569 ns/op 13471893 ns/op 1.02
BenchmarkDocument/array_10000 - B/op 9799706 B/op 9800104 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120294 allocs/op 120296 allocs/op 1.00
BenchmarkDocument/array_gc_100 148213 ns/op 133214 B/op 1264 allocs/op 148152 ns/op 133213 B/op 1264 allocs/op 1.00
BenchmarkDocument/array_gc_100 - ns/op 148213 ns/op 148152 ns/op 1.00
BenchmarkDocument/array_gc_100 - B/op 133214 B/op 133213 B/op 1.00
BenchmarkDocument/array_gc_100 - allocs/op 1264 allocs/op 1264 allocs/op 1
BenchmarkDocument/array_gc_1000 1417937 ns/op 1159574 B/op 12880 allocs/op 1394343 ns/op 1159683 B/op 12881 allocs/op 1.02
BenchmarkDocument/array_gc_1000 - ns/op 1417937 ns/op 1394343 ns/op 1.02
BenchmarkDocument/array_gc_1000 - B/op 1159574 B/op 1159683 B/op 1.00
BenchmarkDocument/array_gc_1000 - allocs/op 12880 allocs/op 12881 allocs/op 1.00
BenchmarkDocument/counter_1000 198770 ns/op 193269 B/op 5771 allocs/op 203327 ns/op 193269 B/op 5771 allocs/op 0.98
BenchmarkDocument/counter_1000 - ns/op 198770 ns/op 203327 ns/op 0.98
BenchmarkDocument/counter_1000 - B/op 193269 B/op 193269 B/op 1
BenchmarkDocument/counter_1000 - allocs/op 5771 allocs/op 5771 allocs/op 1
BenchmarkDocument/counter_10000 2171307 ns/op 2088198 B/op 59778 allocs/op 2213953 ns/op 2088184 B/op 59778 allocs/op 0.98
BenchmarkDocument/counter_10000 - ns/op 2171307 ns/op 2213953 ns/op 0.98
BenchmarkDocument/counter_10000 - B/op 2088198 B/op 2088184 B/op 1.00
BenchmarkDocument/counter_10000 - allocs/op 59778 allocs/op 59778 allocs/op 1
BenchmarkDocument/object_1000 1413997 ns/op 1428170 B/op 9848 allocs/op 1363080 ns/op 1428232 B/op 9849 allocs/op 1.04
BenchmarkDocument/object_1000 - ns/op 1413997 ns/op 1363080 ns/op 1.04
BenchmarkDocument/object_1000 - B/op 1428170 B/op 1428232 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9848 allocs/op 9849 allocs/op 1.00
BenchmarkDocument/object_10000 15497602 ns/op 12167338 B/op 100565 allocs/op 15620464 ns/op 12166215 B/op 100563 allocs/op 0.99
BenchmarkDocument/object_10000 - ns/op 15497602 ns/op 15620464 ns/op 0.99
BenchmarkDocument/object_10000 - B/op 12167338 B/op 12166215 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 100565 allocs/op 100563 allocs/op 1.00
BenchmarkDocument/tree_100 1024570 ns/op 944035 B/op 6104 allocs/op 1020865 ns/op 944035 B/op 6104 allocs/op 1.00
BenchmarkDocument/tree_100 - ns/op 1024570 ns/op 1020865 ns/op 1.00
BenchmarkDocument/tree_100 - B/op 944035 B/op 944035 B/op 1
BenchmarkDocument/tree_100 - allocs/op 6104 allocs/op 6104 allocs/op 1
BenchmarkDocument/tree_1000 74896837 ns/op 86460637 B/op 60118 allocs/op 72552254 ns/op 86460736 B/op 60118 allocs/op 1.03
BenchmarkDocument/tree_1000 - ns/op 74896837 ns/op 72552254 ns/op 1.03
BenchmarkDocument/tree_1000 - B/op 86460637 B/op 86460736 B/op 1.00
BenchmarkDocument/tree_1000 - allocs/op 60118 allocs/op 60118 allocs/op 1
BenchmarkDocument/tree_10000 9814975765 ns/op 8580663072 B/op 600236 allocs/op 9657652346 ns/op 8580983008 B/op 600242 allocs/op 1.02
BenchmarkDocument/tree_10000 - ns/op 9814975765 ns/op 9657652346 ns/op 1.02
BenchmarkDocument/tree_10000 - B/op 8580663072 B/op 8580983008 B/op 1.00
BenchmarkDocument/tree_10000 - allocs/op 600236 allocs/op 600242 allocs/op 1.00
BenchmarkDocument/tree_delete_all_1000 74941399 ns/op 87012984 B/op 67762 allocs/op 74177304 ns/op 86991506 B/op 67761 allocs/op 1.01
BenchmarkDocument/tree_delete_all_1000 - ns/op 74941399 ns/op 74177304 ns/op 1.01
BenchmarkDocument/tree_delete_all_1000 - B/op 87012984 B/op 86991506 B/op 1.00
BenchmarkDocument/tree_delete_all_1000 - allocs/op 67762 allocs/op 67761 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_100 3686261 ns/op 4121680 B/op 14365 allocs/op 3683600 ns/op 4121643 B/op 14365 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_100 - ns/op 3686261 ns/op 3683600 ns/op 1.00
BenchmarkDocument/tree_edit_gc_100 - B/op 4121680 B/op 4121643 B/op 1.00
BenchmarkDocument/tree_edit_gc_100 - allocs/op 14365 allocs/op 14365 allocs/op 1
BenchmarkDocument/tree_edit_gc_1000 298438675 ns/op 383466578 B/op 145415 allocs/op 306189442 ns/op 383469740 B/op 145433 allocs/op 0.97
BenchmarkDocument/tree_edit_gc_1000 - ns/op 298438675 ns/op 306189442 ns/op 0.97
BenchmarkDocument/tree_edit_gc_1000 - B/op 383466578 B/op 383469740 B/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 145415 allocs/op 145433 allocs/op 1.00
BenchmarkDocument/tree_split_gc_100 2454686 ns/op 2387489 B/op 10350 allocs/op 2457242 ns/op 2387559 B/op 10350 allocs/op 1.00
BenchmarkDocument/tree_split_gc_100 - ns/op 2454686 ns/op 2457242 ns/op 1.00
BenchmarkDocument/tree_split_gc_100 - B/op 2387489 B/op 2387559 B/op 1.00
BenchmarkDocument/tree_split_gc_100 - allocs/op 10350 allocs/op 10350 allocs/op 1
BenchmarkDocument/tree_split_gc_1000 183675470 ns/op 221992021 B/op 112265 allocs/op 179637070 ns/op 221990294 B/op 112255 allocs/op 1.02
BenchmarkDocument/tree_split_gc_1000 - ns/op 183675470 ns/op 179637070 ns/op 1.02
BenchmarkDocument/tree_split_gc_1000 - B/op 221992021 B/op 221990294 B/op 1.00
BenchmarkDocument/tree_split_gc_1000 - allocs/op 112265 allocs/op 112255 allocs/op 1.00
BenchmarkRPC/client_to_server 373424432 ns/op 17232082 B/op 186486 allocs/op 375969810 ns/op 18635106 B/op 186557 allocs/op 0.99
BenchmarkRPC/client_to_server - ns/op 373424432 ns/op 375969810 ns/op 0.99
BenchmarkRPC/client_to_server - B/op 17232082 B/op 18635106 B/op 0.92
BenchmarkRPC/client_to_server - allocs/op 186486 allocs/op 186557 allocs/op 1.00
BenchmarkRPC/client_to_client_via_server 642543946 ns/op 35422792 B/op 366849 allocs/op 641048836 ns/op 37895868 B/op 367508 allocs/op 1.00
BenchmarkRPC/client_to_client_via_server - ns/op 642543946 ns/op 641048836 ns/op 1.00
BenchmarkRPC/client_to_client_via_server - B/op 35422792 B/op 37895868 B/op 0.93
BenchmarkRPC/client_to_client_via_server - allocs/op 366849 allocs/op 367508 allocs/op 1.00
BenchmarkRPC/attach_large_document 1396781662 ns/op 1878836760 B/op 8762 allocs/op 1468729928 ns/op 1890139648 B/op 8767 allocs/op 0.95
BenchmarkRPC/attach_large_document - ns/op 1396781662 ns/op 1468729928 ns/op 0.95
BenchmarkRPC/attach_large_document - B/op 1878836760 B/op 1890139648 B/op 0.99
BenchmarkRPC/attach_large_document - allocs/op 8762 allocs/op 8767 allocs/op 1.00
BenchmarkRPC/adminCli_to_server 549179560 ns/op 35984080 B/op 289644 allocs/op 543733918 ns/op 36395064 B/op 289678 allocs/op 1.01
BenchmarkRPC/adminCli_to_server - ns/op 549179560 ns/op 543733918 ns/op 1.01
BenchmarkRPC/adminCli_to_server - B/op 35984080 B/op 36395064 B/op 0.99
BenchmarkRPC/adminCli_to_server - allocs/op 289644 allocs/op 289678 allocs/op 1.00
BenchmarkLocker 72.11 ns/op 16 B/op 1 allocs/op 67.17 ns/op 16 B/op 1 allocs/op 1.07
BenchmarkLocker - ns/op 72.11 ns/op 67.17 ns/op 1.07
BenchmarkLocker - B/op 16 B/op 16 B/op 1
BenchmarkLocker - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkLockerParallel 39.75 ns/op 0 B/op 0 allocs/op 38.99 ns/op 0 B/op 0 allocs/op 1.02
BenchmarkLockerParallel - ns/op 39.75 ns/op 38.99 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 160.6 ns/op 15 B/op 0 allocs/op 146.9 ns/op 15 B/op 0 allocs/op 1.09
BenchmarkLockerMoreKeys - ns/op 160.6 ns/op 146.9 ns/op 1.09
BenchmarkLockerMoreKeys - B/op 15 B/op 15 B/op 1
BenchmarkLockerMoreKeys - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkChange/Push_10_Changes 4013048 ns/op 160380 B/op 2067 allocs/op 4078798 ns/op 160051 B/op 2060 allocs/op 0.98
BenchmarkChange/Push_10_Changes - ns/op 4013048 ns/op 4078798 ns/op 0.98
BenchmarkChange/Push_10_Changes - B/op 160380 B/op 160051 B/op 1.00
BenchmarkChange/Push_10_Changes - allocs/op 2067 allocs/op 2060 allocs/op 1.00
BenchmarkChange/Push_100_Changes 15580798 ns/op 1003955 B/op 13766 allocs/op 16002368 ns/op 991006 B/op 13760 allocs/op 0.97
BenchmarkChange/Push_100_Changes - ns/op 15580798 ns/op 16002368 ns/op 0.97
BenchmarkChange/Push_100_Changes - B/op 1003955 B/op 991006 B/op 1.01
BenchmarkChange/Push_100_Changes - allocs/op 13766 allocs/op 13760 allocs/op 1.00
BenchmarkChange/Push_1000_Changes 126594136 ns/op 9778680 B/op 133547 allocs/op 130713452 ns/op 9830043 B/op 133549 allocs/op 0.97
BenchmarkChange/Push_1000_Changes - ns/op 126594136 ns/op 130713452 ns/op 0.97
BenchmarkChange/Push_1000_Changes - B/op 9778680 B/op 9830043 B/op 0.99
BenchmarkChange/Push_1000_Changes - allocs/op 133547 allocs/op 133549 allocs/op 1.00
BenchmarkChange/Pull_10_Changes 3003132 ns/op 135906 B/op 1732 allocs/op 3037803 ns/op 135315 B/op 1733 allocs/op 0.99
BenchmarkChange/Pull_10_Changes - ns/op 3003132 ns/op 3037803 ns/op 0.99
BenchmarkChange/Pull_10_Changes - B/op 135906 B/op 135315 B/op 1.00
BenchmarkChange/Pull_10_Changes - allocs/op 1732 allocs/op 1733 allocs/op 1.00
BenchmarkChange/Pull_100_Changes 5150692 ns/op 561175 B/op 9499 allocs/op 5059688 ns/op 560432 B/op 9502 allocs/op 1.02
BenchmarkChange/Pull_100_Changes - ns/op 5150692 ns/op 5059688 ns/op 1.02
BenchmarkChange/Pull_100_Changes - B/op 561175 B/op 560432 B/op 1.00
BenchmarkChange/Pull_100_Changes - allocs/op 9499 allocs/op 9502 allocs/op 1.00
BenchmarkChange/Pull_1000_Changes 15695945 ns/op 4391644 B/op 89181 allocs/op 15256127 ns/op 4393942 B/op 89176 allocs/op 1.03
BenchmarkChange/Pull_1000_Changes - ns/op 15695945 ns/op 15256127 ns/op 1.03
BenchmarkChange/Pull_1000_Changes - B/op 4391644 B/op 4393942 B/op 1.00
BenchmarkChange/Pull_1000_Changes - allocs/op 89181 allocs/op 89176 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot 17868105 ns/op 1179498 B/op 14476 allocs/op 17999653 ns/op 1177852 B/op 14473 allocs/op 0.99
BenchmarkSnapshot/Push_3KB_snapshot - ns/op 17868105 ns/op 17999653 ns/op 0.99
BenchmarkSnapshot/Push_3KB_snapshot - B/op 1179498 B/op 1177852 B/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op 14476 allocs/op 14473 allocs/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot 132771045 ns/op 14208376 B/op 191552 allocs/op 135306560 ns/op 14307232 B/op 194617 allocs/op 0.98
BenchmarkSnapshot/Push_30KB_snapshot - ns/op 132771045 ns/op 135306560 ns/op 0.98
BenchmarkSnapshot/Push_30KB_snapshot - B/op 14208376 B/op 14307232 B/op 0.99
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op 191552 allocs/op 194617 allocs/op 0.98
BenchmarkSnapshot/Pull_3KB_snapshot 7058748 ns/op 1504759 B/op 27480 allocs/op 7253651 ns/op 1503170 B/op 27475 allocs/op 0.97
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op 7058748 ns/op 7253651 ns/op 0.97
BenchmarkSnapshot/Pull_3KB_snapshot - B/op 1504759 B/op 1503170 B/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op 27480 allocs/op 27475 allocs/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot 24831979 ns/op 13041633 B/op 268788 allocs/op 25453615 ns/op 13052962 B/op 268878 allocs/op 0.98
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op 24831979 ns/op 25453615 ns/op 0.98
BenchmarkSnapshot/Pull_30KB_snapshot - B/op 13041633 B/op 13052962 B/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op 268788 allocs/op 268878 allocs/op 1.00
BenchmarkSync/memory_sync_10_test 7046 ns/op 1286 B/op 38 allocs/op 6920 ns/op 1286 B/op 38 allocs/op 1.02
BenchmarkSync/memory_sync_10_test - ns/op 7046 ns/op 6920 ns/op 1.02
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 54656 ns/op 8681 B/op 275 allocs/op 51635 ns/op 8655 B/op 274 allocs/op 1.06
BenchmarkSync/memory_sync_100_test - ns/op 54656 ns/op 51635 ns/op 1.06
BenchmarkSync/memory_sync_100_test - B/op 8681 B/op 8655 B/op 1.00
BenchmarkSync/memory_sync_100_test - allocs/op 275 allocs/op 274 allocs/op 1.00
BenchmarkSync/memory_sync_1000_test 581384 ns/op 75386 B/op 2173 allocs/op 580719 ns/op 74598 B/op 2127 allocs/op 1.00
BenchmarkSync/memory_sync_1000_test - ns/op 581384 ns/op 580719 ns/op 1.00
BenchmarkSync/memory_sync_1000_test - B/op 75386 B/op 74598 B/op 1.01
BenchmarkSync/memory_sync_1000_test - allocs/op 2173 allocs/op 2127 allocs/op 1.02
BenchmarkSync/memory_sync_10000_test 7267640 ns/op 771208 B/op 20630 allocs/op 7124846 ns/op 752918 B/op 20466 allocs/op 1.02
BenchmarkSync/memory_sync_10000_test - ns/op 7267640 ns/op 7124846 ns/op 1.02
BenchmarkSync/memory_sync_10000_test - B/op 771208 B/op 752918 B/op 1.02
BenchmarkSync/memory_sync_10000_test - allocs/op 20630 allocs/op 20466 allocs/op 1.01
BenchmarkTextEditing 18903032464 ns/op 9214058848 B/op 21233325 allocs/op 18833752872 ns/op 9214203704 B/op 21234190 allocs/op 1.00
BenchmarkTextEditing - ns/op 18903032464 ns/op 18833752872 ns/op 1.00
BenchmarkTextEditing - B/op 9214058848 B/op 9214203704 B/op 1.00
BenchmarkTextEditing - allocs/op 21233325 allocs/op 21234190 allocs/op 1.00

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

Please sign in to comment.