Skip to content

Commit

Permalink
Remove createdAtMapByActor in EditReverseOperation
Browse files Browse the repository at this point in the history
  • Loading branch information
chacha912 committed Sep 25, 2023
1 parent 5646591 commit 57e196e
Show file tree
Hide file tree
Showing 5 changed files with 194 additions and 383 deletions.
8 changes: 0 additions & 8 deletions api/converter/from_pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,6 @@ func fromEditReverse(pbEditReverse *api.Operation_EditReverse) (*operations.Edit
return nil, err
}

createdAtMapByActor, err := fromCreatedAtMapByActor(
pbEditReverse.CreatedAtMapByActor,
)
if err != nil {
return nil, err
}

var deletedIDs []*crdt.RGATreeSplitNodePos
pbDeletedIDs := pbEditReverse.GetDeletedIds()
for _, pbDeletedID := range pbDeletedIDs {
Expand Down Expand Up @@ -470,7 +463,6 @@ func fromEditReverse(pbEditReverse *api.Operation_EditReverse) (*operations.Edit
parentCreatedAt,
deletedIDs,
insertedIDs,
createdAtMapByActor,
pbEditReverse.Attributes,
executedAt,
), nil
Expand Down
11 changes: 5 additions & 6 deletions api/converter/to_pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,11 @@ func toEditReverse(e *operations.EditReverse) (*api.Operation_EditReverse_, erro

return &api.Operation_EditReverse_{
EditReverse: &api.Operation_EditReverse{
ParentCreatedAt: ToTimeTicket(e.ParentCreatedAt()),
DeletedIds: pbDeletedIDs,
InsertedIds: pbInsertedIDs,
CreatedAtMapByActor: toCreatedAtMapByActor(e.CreatedAtMapByActor()),
Attributes: e.Attributes(),
ExecutedAt: ToTimeTicket(e.ExecutedAt()),
ParentCreatedAt: ToTimeTicket(e.ParentCreatedAt()),
DeletedIds: pbDeletedIDs,
InsertedIds: pbInsertedIDs,
Attributes: e.Attributes(),
ExecutedAt: ToTimeTicket(e.ExecutedAt()),
},
}, nil
}
Expand Down
Loading

1 comment on commit 57e196e

@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: 57e196e Previous: 5646591 Ratio
BenchmarkDocument/constructor_test - ns/op 1510 ns/op 1522 ns/op 0.99
BenchmarkDocument/constructor_test - B/op 984 B/op 984 B/op 1
BenchmarkDocument/constructor_test - allocs/op 16 allocs/op 16 allocs/op 1
BenchmarkDocument/status_test - ns/op 867 ns/op 892.4 ns/op 0.97
BenchmarkDocument/status_test - B/op 952 B/op 952 B/op 1
BenchmarkDocument/status_test - allocs/op 14 allocs/op 14 allocs/op 1
BenchmarkDocument/equals_test - ns/op 8767 ns/op 9860 ns/op 0.89
BenchmarkDocument/equals_test - B/op 6192 B/op 6192 B/op 1
BenchmarkDocument/equals_test - allocs/op 106 allocs/op 106 allocs/op 1
BenchmarkDocument/nested_update_test - ns/op 21647 ns/op 21834 ns/op 0.99
BenchmarkDocument/nested_update_test - B/op 11689 B/op 11689 B/op 1
BenchmarkDocument/nested_update_test - allocs/op 248 allocs/op 248 allocs/op 1
BenchmarkDocument/delete_test - ns/op 29411 ns/op 29783 ns/op 0.99
BenchmarkDocument/delete_test - B/op 14915 B/op 14915 B/op 1
BenchmarkDocument/delete_test - allocs/op 327 allocs/op 327 allocs/op 1
BenchmarkDocument/object_test - ns/op 10681 ns/op 10674 ns/op 1.00
BenchmarkDocument/object_test - B/op 6448 B/op 6448 B/op 1
BenchmarkDocument/object_test - allocs/op 110 allocs/op 110 allocs/op 1
BenchmarkDocument/array_test - ns/op 46115 ns/op 36279 ns/op 1.27
BenchmarkDocument/array_test - B/op 11546 B/op 11546 B/op 1
BenchmarkDocument/array_test - allocs/op 264 allocs/op 264 allocs/op 1
BenchmarkDocument/text_test - ns/op 38990 ns/op 38989 ns/op 1.00
BenchmarkDocument/text_test - B/op 14618 B/op 14618 B/op 1
BenchmarkDocument/text_test - allocs/op 470 allocs/op 470 allocs/op 1
BenchmarkDocument/text_composition_test - ns/op 39195 ns/op 40049 ns/op 0.98
BenchmarkDocument/text_composition_test - B/op 18002 B/op 18002 B/op 1
BenchmarkDocument/text_composition_test - allocs/op 471 allocs/op 471 allocs/op 1
BenchmarkDocument/rich_text_test - ns/op 107825 ns/op 114582 ns/op 0.94
BenchmarkDocument/rich_text_test - B/op 38391 B/op 38400 B/op 1.00
BenchmarkDocument/rich_text_test - allocs/op 1149 allocs/op 1149 allocs/op 1
BenchmarkDocument/counter_test - ns/op 21787 ns/op 21834 ns/op 1.00
BenchmarkDocument/counter_test - B/op 9970 B/op 9969 B/op 1.00
BenchmarkDocument/counter_test - allocs/op 235 allocs/op 235 allocs/op 1
BenchmarkDocument/text_edit_gc_100 - ns/op 4098938 ns/op 4120825 ns/op 0.99
BenchmarkDocument/text_edit_gc_100 - B/op 1553191 B/op 1553196 B/op 1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op 17163 allocs/op 17162 allocs/op 1.00
BenchmarkDocument/text_edit_gc_1000 - ns/op 350731357 ns/op 322032612 ns/op 1.09
BenchmarkDocument/text_edit_gc_1000 - B/op 136647490 B/op 136636496 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 210787 allocs/op 210707 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 - ns/op 4629557 ns/op 4675698 ns/op 0.99
BenchmarkDocument/text_split_gc_100 - B/op 2217767 B/op 2217521 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 16589 allocs/op 16588 allocs/op 1.00
BenchmarkDocument/text_split_gc_1000 - ns/op 377770846 ns/op 376794481 ns/op 1.00
BenchmarkDocument/text_split_gc_1000 - B/op 214870845 B/op 214875752 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 211468 allocs/op 211528 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 - ns/op 16483174 ns/op 16621706 ns/op 0.99
BenchmarkDocument/text_delete_all_10000 - B/op 5904337 B/op 5905005 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 41126 allocs/op 41128 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 - ns/op 190539587 ns/op 211995005 ns/op 0.90
BenchmarkDocument/text_delete_all_100000 - B/op 53875560 B/op 53844776 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 416020 allocs/op 415997 allocs/op 1.00
BenchmarkDocument/text_100 - ns/op 309613 ns/op 317230 ns/op 0.98
BenchmarkDocument/text_100 - B/op 118210 B/op 118210 B/op 1
BenchmarkDocument/text_100 - allocs/op 5074 allocs/op 5074 allocs/op 1
BenchmarkDocument/text_1000 - ns/op 3318151 ns/op 3414955 ns/op 0.97
BenchmarkDocument/text_1000 - B/op 1152814 B/op 1152794 B/op 1.00
BenchmarkDocument/text_1000 - allocs/op 50078 allocs/op 50078 allocs/op 1
BenchmarkDocument/array_1000 - ns/op 1715467 ns/op 1813111 ns/op 0.95
BenchmarkDocument/array_1000 - B/op 1102833 B/op 1102773 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11867 allocs/op 11867 allocs/op 1
BenchmarkDocument/array_10000 - ns/op 18836113 ns/op 18724056 ns/op 1.01
BenchmarkDocument/array_10000 - B/op 9906769 B/op 9908284 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120719 allocs/op 120724 allocs/op 1.00
BenchmarkDocument/array_gc_100 - ns/op 181308 ns/op 183031 ns/op 0.99
BenchmarkDocument/array_gc_100 - B/op 98160 B/op 98151 B/op 1.00
BenchmarkDocument/array_gc_100 - allocs/op 1243 allocs/op 1243 allocs/op 1
BenchmarkDocument/array_gc_1000 - ns/op 1933016 ns/op 1987759 ns/op 0.97
BenchmarkDocument/array_gc_1000 - B/op 1170430 B/op 1170312 B/op 1.00
BenchmarkDocument/array_gc_1000 - allocs/op 12906 allocs/op 12906 allocs/op 1
BenchmarkDocument/counter_1000 - ns/op 275946 ns/op 276703 ns/op 1.00
BenchmarkDocument/counter_1000 - B/op 198530 B/op 198532 B/op 1.00
BenchmarkDocument/counter_1000 - allocs/op 6503 allocs/op 6503 allocs/op 1
BenchmarkDocument/counter_10000 - ns/op 2995251 ns/op 3010059 ns/op 1.00
BenchmarkDocument/counter_10000 - B/op 2165453 B/op 2165453 B/op 1
BenchmarkDocument/counter_10000 - allocs/op 69510 allocs/op 69510 allocs/op 1
BenchmarkDocument/object_1000 - ns/op 1878286 ns/op 1938264 ns/op 0.97
BenchmarkDocument/object_1000 - B/op 1451206 B/op 1451364 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9915 allocs/op 9915 allocs/op 1
BenchmarkDocument/object_10000 - ns/op 22047321 ns/op 21261838 ns/op 1.04
BenchmarkDocument/object_10000 - B/op 12370071 B/op 12369279 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 101222 allocs/op 101219 allocs/op 1.00
BenchmarkDocument/tree_100 - ns/op 990284 ns/op 990721 ns/op 1.00
BenchmarkDocument/tree_100 - B/op 442621 B/op 442621 B/op 1
BenchmarkDocument/tree_100 - allocs/op 4500 allocs/op 4500 allocs/op 1
BenchmarkDocument/tree_1000 - ns/op 68139047 ns/op 68207879 ns/op 1.00
BenchmarkDocument/tree_1000 - B/op 35222974 B/op 35222471 B/op 1.00
BenchmarkDocument/tree_1000 - allocs/op 44112 allocs/op 44112 allocs/op 1
BenchmarkDocument/tree_10000 - ns/op 8373599923 ns/op 8217569901 ns/op 1.02
BenchmarkDocument/tree_10000 - B/op 3438872992 B/op 3438881408 B/op 1.00
BenchmarkDocument/tree_10000 - allocs/op 440143 allocs/op 440142 allocs/op 1.00
BenchmarkDocument/tree_delete_all_1000 - ns/op 70100124 ns/op 71137413 ns/op 0.99
BenchmarkDocument/tree_delete_all_1000 - B/op 35692631 B/op 35692005 B/op 1.00
BenchmarkDocument/tree_delete_all_1000 - allocs/op 51763 allocs/op 51762 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_100 - ns/op 3614400 ns/op 3607358 ns/op 1.00
BenchmarkDocument/tree_edit_gc_100 - B/op 2077142 B/op 2077145 B/op 1.00
BenchmarkDocument/tree_edit_gc_100 - allocs/op 11159 allocs/op 11159 allocs/op 1
BenchmarkDocument/tree_edit_gc_1000 - ns/op 270314976 ns/op 267995710 ns/op 1.01
BenchmarkDocument/tree_edit_gc_1000 - B/op 180291552 B/op 180289278 B/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 113362 allocs/op 113360 allocs/op 1.00
BenchmarkDocument/tree_split_gc_100 - ns/op 2649225 ns/op 2596083 ns/op 1.02
BenchmarkDocument/tree_split_gc_100 - B/op 1347589 B/op 1347551 B/op 1.00
BenchmarkDocument/tree_split_gc_100 - allocs/op 9055 allocs/op 9055 allocs/op 1
BenchmarkDocument/tree_split_gc_1000 - ns/op 171357890 ns/op 166546106 ns/op 1.03
BenchmarkDocument/tree_split_gc_1000 - B/op 113958098 B/op 113956276 B/op 1.00
BenchmarkDocument/tree_split_gc_1000 - allocs/op 93874 allocs/op 93865 allocs/op 1.00
BenchmarkRPC/client_to_server - ns/op 394724728 ns/op 375704027 ns/op 1.05
BenchmarkRPC/client_to_server - B/op 12266946 B/op 12258680 B/op 1.00
BenchmarkRPC/client_to_server - allocs/op 177162 allocs/op 177150 allocs/op 1.00
BenchmarkRPC/client_to_client_via_server - ns/op 664648616 ns/op 640196714 ns/op 1.04
BenchmarkRPC/client_to_client_via_server - B/op 22570968 B/op 22592212 B/op 1.00
BenchmarkRPC/client_to_client_via_server - allocs/op 330537 allocs/op 330679 allocs/op 1.00
BenchmarkRPC/attach_large_document - ns/op 1578881244 ns/op 1624755617 ns/op 0.97
BenchmarkRPC/attach_large_document - B/op 1819557200 B/op 1809251568 B/op 1.01
BenchmarkRPC/attach_large_document - allocs/op 9819 allocs/op 9475 allocs/op 1.04
BenchmarkRPC/adminCli_to_server - ns/op 555429190 ns/op 553995758 ns/op 1.00
BenchmarkRPC/adminCli_to_server - B/op 20399192 B/op 20395380 B/op 1.00
BenchmarkRPC/adminCli_to_server - allocs/op 321642 allocs/op 321642 allocs/op 1
BenchmarkLocker - ns/op 113.8 ns/op 125.2 ns/op 0.91
BenchmarkLocker - B/op 16 B/op 16 B/op 1
BenchmarkLocker - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkLockerParallel - ns/op 123 ns/op 122.3 ns/op 1.01
BenchmarkLockerParallel - B/op 0 B/op 0 B/op NaN
BenchmarkLockerParallel - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkLockerMoreKeys - ns/op 420.8 ns/op 406.6 ns/op 1.03
BenchmarkLockerMoreKeys - B/op 14 B/op 14 B/op 1
BenchmarkLockerMoreKeys - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkSync/memory_sync_10_test - ns/op 7507 ns/op 7473 ns/op 1.00
BenchmarkSync/memory_sync_10_test - B/op 1284 B/op 1284 B/op 1
BenchmarkSync/memory_sync_10_test - allocs/op 38 allocs/op 38 allocs/op 1
BenchmarkSync/memory_sync_100_test - ns/op 63929 ns/op 63421 ns/op 1.01
BenchmarkSync/memory_sync_100_test - B/op 8926 B/op 8941 B/op 1.00
BenchmarkSync/memory_sync_100_test - allocs/op 291 allocs/op 292 allocs/op 1.00
BenchmarkSync/memory_sync_1000_test - ns/op 621294 ns/op 633167 ns/op 0.98
BenchmarkSync/memory_sync_1000_test - B/op 83636 B/op 83847 B/op 1.00
BenchmarkSync/memory_sync_1000_test - allocs/op 2703 allocs/op 2712 allocs/op 1.00
BenchmarkSync/memory_sync_10000_test - ns/op 6379879 ns/op 6867659 ns/op 0.93
BenchmarkSync/memory_sync_10000_test - B/op 853079 B/op 861725 B/op 0.99
BenchmarkSync/memory_sync_10000_test - allocs/op 27579 allocs/op 27606 allocs/op 1.00
BenchmarkTextEditing - ns/op 24671063553 ns/op 25823619242 ns/op 0.96
BenchmarkTextEditing - B/op 8456389208 B/op 8456493696 B/op 1.00
BenchmarkTextEditing - allocs/op 20613404 allocs/op 20613981 allocs/op 1.00

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

Please sign in to comment.