Skip to content

Commit

Permalink
Add watch subscription checking for event flush when not subscribing
Browse files Browse the repository at this point in the history
  • Loading branch information
krapie committed Feb 28, 2024
1 parent c37f005 commit 5ab07b5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
14 changes: 13 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"os"
"path/filepath"
"strings"
"sync/atomic"

"connectrpc.com/connect"
"github.com/rs/xid"
Expand Down Expand Up @@ -72,13 +73,18 @@ var (

// ErrInitializationNotReceived occurs when the first response of the watch stream is not received.
ErrInitializationNotReceived = errors.New("initialization is not received")

// ErrAlreadySubscribed occurs when the client is already subscribed to the document.
ErrAlreadySubscribed = errors.New("already subscribed")
)

// Attachment represents the document attached.
type Attachment struct {
doc *document.Document
docID types.ID

isSubscribed atomic.Bool

rch <-chan WatchResponse
ctx context.Context
cancelFunc context.CancelFunc
Expand Down Expand Up @@ -432,6 +438,11 @@ func (c *Client) Subscribe(
return nil, nil, ErrDocumentNotAttached
}

if attachment.isSubscribed.Load() {
return nil, nil, ErrAlreadySubscribed
}
attachment.isSubscribed.Store(true)

return attachment.rch, attachment.cancelFunc, nil
}

Expand Down Expand Up @@ -485,13 +496,14 @@ func (c *Client) runWatchLoop(
close(rch)
return
}
if resp == nil {
if resp == nil || !attachment.isSubscribed.Load() {
continue
}

rch <- *resp
}
if err = stream.Err(); err != nil {
attachment.isSubscribed.Store(false)
rch <- WatchResponse{Err: err}
close(rch)
return
Expand Down
10 changes: 0 additions & 10 deletions test/integration/document_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ func TestDocument(t *testing.T) {
rch, _, err := c1.Subscribe(d1)
assert.NoError(t, err)

isPresenceChangedEvent := true
go func() {
defer wg.Done()

Expand All @@ -178,16 +177,7 @@ func TestDocument(t *testing.T) {
}
assert.NoError(t, resp.Err)

// TODO(krapie): event includes presence changes in the document too.
// therefore, there will be
// 1. DocumentChanged from client 2 (Presence change)
// 2. DocumentWatched from client 2 (Watch event)
// 3. DocumentChanged from client 2 (Document change)
if resp.Type == client.DocumentChanged {
if isPresenceChangedEvent {
isPresenceChangedEvent = false
continue
}
err := c1.Sync(ctx, client.WithDocKey(d1.Key()))
assert.NoError(t, err)
return
Expand Down

1 comment on commit 5ab07b5

@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: 5ab07b5 Previous: c37f005 Ratio
BenchmarkDocument/constructor_test 1499 ns/op 1224 B/op 21 allocs/op 1639 ns/op 1224 B/op 21 allocs/op 0.91
BenchmarkDocument/constructor_test - ns/op 1499 ns/op 1639 ns/op 0.91
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 843 ns/op 1192 B/op 19 allocs/op 838.9 ns/op 1192 B/op 19 allocs/op 1.00
BenchmarkDocument/status_test - ns/op 843 ns/op 838.9 ns/op 1.00
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 7470 ns/op 6977 B/op 124 allocs/op 7395 ns/op 6977 B/op 124 allocs/op 1.01
BenchmarkDocument/equals_test - ns/op 7470 ns/op 7395 ns/op 1.01
BenchmarkDocument/equals_test - B/op 6977 B/op 6977 B/op 1
BenchmarkDocument/equals_test - allocs/op 124 allocs/op 124 allocs/op 1
BenchmarkDocument/nested_update_test 16717 ns/op 12058 B/op 260 allocs/op 16641 ns/op 12059 B/op 260 allocs/op 1.00
BenchmarkDocument/nested_update_test - ns/op 16717 ns/op 16641 ns/op 1.00
BenchmarkDocument/nested_update_test - B/op 12058 B/op 12059 B/op 1.00
BenchmarkDocument/nested_update_test - allocs/op 260 allocs/op 260 allocs/op 1
BenchmarkDocument/delete_test 22513 ns/op 15284 B/op 339 allocs/op 23180 ns/op 15283 B/op 339 allocs/op 0.97
BenchmarkDocument/delete_test - ns/op 22513 ns/op 23180 ns/op 0.97
BenchmarkDocument/delete_test - B/op 15284 B/op 15283 B/op 1.00
BenchmarkDocument/delete_test - allocs/op 339 allocs/op 339 allocs/op 1
BenchmarkDocument/object_test 8458 ns/op 6753 B/op 118 allocs/op 8484 ns/op 6753 B/op 118 allocs/op 1.00
BenchmarkDocument/object_test - ns/op 8458 ns/op 8484 ns/op 1.00
BenchmarkDocument/object_test - B/op 6753 B/op 6753 B/op 1
BenchmarkDocument/object_test - allocs/op 118 allocs/op 118 allocs/op 1
BenchmarkDocument/array_test 28766 ns/op 11883 B/op 274 allocs/op 29123 ns/op 11882 B/op 274 allocs/op 0.99
BenchmarkDocument/array_test - ns/op 28766 ns/op 29123 ns/op 0.99
BenchmarkDocument/array_test - B/op 11883 B/op 11882 B/op 1.00
BenchmarkDocument/array_test - allocs/op 274 allocs/op 274 allocs/op 1
BenchmarkDocument/text_test 30585 ns/op 14915 B/op 470 allocs/op 30999 ns/op 14915 B/op 470 allocs/op 0.99
BenchmarkDocument/text_test - ns/op 30585 ns/op 30999 ns/op 0.99
BenchmarkDocument/text_test - B/op 14915 B/op 14915 B/op 1
BenchmarkDocument/text_test - allocs/op 470 allocs/op 470 allocs/op 1
BenchmarkDocument/text_composition_test 28948 ns/op 18430 B/op 479 allocs/op 29261 ns/op 18428 B/op 479 allocs/op 0.99
BenchmarkDocument/text_composition_test - ns/op 28948 ns/op 29261 ns/op 0.99
BenchmarkDocument/text_composition_test - B/op 18430 B/op 18428 B/op 1.00
BenchmarkDocument/text_composition_test - allocs/op 479 allocs/op 479 allocs/op 1
BenchmarkDocument/rich_text_test 80339 ns/op 38677 B/op 1149 allocs/op 80023 ns/op 38676 B/op 1149 allocs/op 1.00
BenchmarkDocument/rich_text_test - ns/op 80339 ns/op 80023 ns/op 1.00
BenchmarkDocument/rich_text_test - B/op 38677 B/op 38676 B/op 1.00
BenchmarkDocument/rich_text_test - allocs/op 1149 allocs/op 1149 allocs/op 1
BenchmarkDocument/counter_test 17190 ns/op 10658 B/op 242 allocs/op 17340 ns/op 10658 B/op 242 allocs/op 0.99
BenchmarkDocument/counter_test - ns/op 17190 ns/op 17340 ns/op 0.99
BenchmarkDocument/counter_test - B/op 10658 B/op 10658 B/op 1
BenchmarkDocument/counter_test - allocs/op 242 allocs/op 242 allocs/op 1
BenchmarkDocument/text_edit_gc_100 2875896 ns/op 1658507 B/op 17094 allocs/op 2897087 ns/op 1658608 B/op 17094 allocs/op 0.99
BenchmarkDocument/text_edit_gc_100 - ns/op 2875896 ns/op 2897087 ns/op 0.99
BenchmarkDocument/text_edit_gc_100 - B/op 1658507 B/op 1658608 B/op 1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op 17094 allocs/op 17094 allocs/op 1
BenchmarkDocument/text_edit_gc_1000 228316892 ns/op 144398889 B/op 201018 allocs/op 228766633 ns/op 144366003 B/op 200865 allocs/op 1.00
BenchmarkDocument/text_edit_gc_1000 - ns/op 228316892 ns/op 228766633 ns/op 1.00
BenchmarkDocument/text_edit_gc_1000 - B/op 144398889 B/op 144366003 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 201018 allocs/op 200865 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 3433211 ns/op 2316656 B/op 16195 allocs/op 3401564 ns/op 2317046 B/op 16195 allocs/op 1.01
BenchmarkDocument/text_split_gc_100 - ns/op 3433211 ns/op 3401564 ns/op 1.01
BenchmarkDocument/text_split_gc_100 - B/op 2316656 B/op 2317046 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 16195 allocs/op 16195 allocs/op 1
BenchmarkDocument/text_split_gc_1000 291747331 ns/op 228916076 B/op 203908 allocs/op 293221688 ns/op 228920800 B/op 203933 allocs/op 0.99
BenchmarkDocument/text_split_gc_1000 - ns/op 291747331 ns/op 293221688 ns/op 0.99
BenchmarkDocument/text_split_gc_1000 - B/op 228916076 B/op 228920800 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 203908 allocs/op 203933 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 10935956 ns/op 5810124 B/op 40672 allocs/op 11016766 ns/op 5810274 B/op 40673 allocs/op 0.99
BenchmarkDocument/text_delete_all_10000 - ns/op 10935956 ns/op 11016766 ns/op 0.99
BenchmarkDocument/text_delete_all_10000 - B/op 5810124 B/op 5810274 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 40672 allocs/op 40673 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 177299231 ns/op 81902725 B/op 411636 allocs/op 199950589 ns/op 81908149 B/op 411668 allocs/op 0.89
BenchmarkDocument/text_delete_all_100000 - ns/op 177299231 ns/op 199950589 ns/op 0.89
BenchmarkDocument/text_delete_all_100000 - B/op 81902725 B/op 81908149 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 411636 allocs/op 411668 allocs/op 1.00
BenchmarkDocument/text_100 229267 ns/op 120139 B/op 5082 allocs/op 215621 ns/op 120139 B/op 5082 allocs/op 1.06
BenchmarkDocument/text_100 - ns/op 229267 ns/op 215621 ns/op 1.06
BenchmarkDocument/text_100 - B/op 120139 B/op 120139 B/op 1
BenchmarkDocument/text_100 - allocs/op 5082 allocs/op 5082 allocs/op 1
BenchmarkDocument/text_1000 2464987 ns/op 1169127 B/op 50086 allocs/op 2375595 ns/op 1169125 B/op 50086 allocs/op 1.04
BenchmarkDocument/text_1000 - ns/op 2464987 ns/op 2375595 ns/op 1.04
BenchmarkDocument/text_1000 - B/op 1169127 B/op 1169125 B/op 1.00
BenchmarkDocument/text_1000 - allocs/op 50086 allocs/op 50086 allocs/op 1
BenchmarkDocument/array_1000 1263397 ns/op 1091281 B/op 11829 allocs/op 1197279 ns/op 1091343 B/op 11830 allocs/op 1.06
BenchmarkDocument/array_1000 - ns/op 1263397 ns/op 1197279 ns/op 1.06
BenchmarkDocument/array_1000 - B/op 1091281 B/op 1091343 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11829 allocs/op 11830 allocs/op 1.00
BenchmarkDocument/array_10000 13186985 ns/op 9799606 B/op 120293 allocs/op 13438014 ns/op 9800050 B/op 120295 allocs/op 0.98
BenchmarkDocument/array_10000 - ns/op 13186985 ns/op 13438014 ns/op 0.98
BenchmarkDocument/array_10000 - B/op 9799606 B/op 9800050 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120293 allocs/op 120295 allocs/op 1.00
BenchmarkDocument/array_gc_100 153486 ns/op 132650 B/op 1258 allocs/op 146186 ns/op 132644 B/op 1258 allocs/op 1.05
BenchmarkDocument/array_gc_100 - ns/op 153486 ns/op 146186 ns/op 1.05
BenchmarkDocument/array_gc_100 - B/op 132650 B/op 132644 B/op 1.00
BenchmarkDocument/array_gc_100 - allocs/op 1258 allocs/op 1258 allocs/op 1
BenchmarkDocument/array_gc_1000 1449948 ns/op 1159141 B/op 12875 allocs/op 1383765 ns/op 1159029 B/op 12874 allocs/op 1.05
BenchmarkDocument/array_gc_1000 - ns/op 1449948 ns/op 1383765 ns/op 1.05
BenchmarkDocument/array_gc_1000 - B/op 1159141 B/op 1159029 B/op 1.00
BenchmarkDocument/array_gc_1000 - allocs/op 12875 allocs/op 12874 allocs/op 1.00
BenchmarkDocument/counter_1000 215081 ns/op 193013 B/op 5769 allocs/op 201692 ns/op 193013 B/op 5769 allocs/op 1.07
BenchmarkDocument/counter_1000 - ns/op 215081 ns/op 201692 ns/op 1.07
BenchmarkDocument/counter_1000 - B/op 193013 B/op 193013 B/op 1
BenchmarkDocument/counter_1000 - allocs/op 5769 allocs/op 5769 allocs/op 1
BenchmarkDocument/counter_10000 2238980 ns/op 2087915 B/op 59776 allocs/op 2193232 ns/op 2087930 B/op 59776 allocs/op 1.02
BenchmarkDocument/counter_10000 - ns/op 2238980 ns/op 2193232 ns/op 1.02
BenchmarkDocument/counter_10000 - B/op 2087915 B/op 2087930 B/op 1.00
BenchmarkDocument/counter_10000 - allocs/op 59776 allocs/op 59776 allocs/op 1
BenchmarkDocument/object_1000 1488583 ns/op 1428092 B/op 9847 allocs/op 1361675 ns/op 1427905 B/op 9846 allocs/op 1.09
BenchmarkDocument/object_1000 - ns/op 1488583 ns/op 1361675 ns/op 1.09
BenchmarkDocument/object_1000 - B/op 1428092 B/op 1427905 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9847 allocs/op 9846 allocs/op 1.00
BenchmarkDocument/object_10000 15441551 ns/op 12168101 B/op 100568 allocs/op 14948455 ns/op 12166796 B/op 100562 allocs/op 1.03
BenchmarkDocument/object_10000 - ns/op 15441551 ns/op 14948455 ns/op 1.03
BenchmarkDocument/object_10000 - B/op 12168101 B/op 12166796 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 100568 allocs/op 100562 allocs/op 1.00
BenchmarkDocument/tree_100 1063766 ns/op 943780 B/op 6102 allocs/op 1018851 ns/op 943788 B/op 6102 allocs/op 1.04
BenchmarkDocument/tree_100 - ns/op 1063766 ns/op 1018851 ns/op 1.04
BenchmarkDocument/tree_100 - B/op 943780 B/op 943788 B/op 1.00
BenchmarkDocument/tree_100 - allocs/op 6102 allocs/op 6102 allocs/op 1
BenchmarkDocument/tree_1000 78280571 ns/op 86460522 B/op 60116 allocs/op 73730641 ns/op 86459989 B/op 60117 allocs/op 1.06
BenchmarkDocument/tree_1000 - ns/op 78280571 ns/op 73730641 ns/op 1.06
BenchmarkDocument/tree_1000 - B/op 86460522 B/op 86459989 B/op 1.00
BenchmarkDocument/tree_1000 - allocs/op 60116 allocs/op 60117 allocs/op 1.00
BenchmarkDocument/tree_10000 9700613497 ns/op 8580654560 B/op 600235 allocs/op 9699327730 ns/op 8580977888 B/op 600211 allocs/op 1.00
BenchmarkDocument/tree_10000 - ns/op 9700613497 ns/op 9699327730 ns/op 1.00
BenchmarkDocument/tree_10000 - B/op 8580654560 B/op 8580977888 B/op 1.00
BenchmarkDocument/tree_10000 - allocs/op 600235 allocs/op 600211 allocs/op 1.00
BenchmarkDocument/tree_delete_all_1000 81242025 ns/op 86990916 B/op 67754 allocs/op 73875906 ns/op 86990702 B/op 67754 allocs/op 1.10
BenchmarkDocument/tree_delete_all_1000 - ns/op 81242025 ns/op 73875906 ns/op 1.10
BenchmarkDocument/tree_delete_all_1000 - B/op 86990916 B/op 86990702 B/op 1.00
BenchmarkDocument/tree_delete_all_1000 - allocs/op 67754 allocs/op 67754 allocs/op 1
BenchmarkDocument/tree_edit_gc_100 3935976 ns/op 4121153 B/op 14360 allocs/op 3711279 ns/op 4121127 B/op 14359 allocs/op 1.06
BenchmarkDocument/tree_edit_gc_100 - ns/op 3935976 ns/op 3711279 ns/op 1.06
BenchmarkDocument/tree_edit_gc_100 - B/op 4121153 B/op 4121127 B/op 1.00
BenchmarkDocument/tree_edit_gc_100 - allocs/op 14360 allocs/op 14359 allocs/op 1.00
BenchmarkDocument/tree_edit_gc_1000 323359998 ns/op 383467594 B/op 145419 allocs/op 301832853 ns/op 383466526 B/op 145410 allocs/op 1.07
BenchmarkDocument/tree_edit_gc_1000 - ns/op 323359998 ns/op 301832853 ns/op 1.07
BenchmarkDocument/tree_edit_gc_1000 - B/op 383467594 B/op 383466526 B/op 1.00
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 145419 allocs/op 145410 allocs/op 1.00
BenchmarkDocument/tree_split_gc_100 2594942 ns/op 2386963 B/op 10344 allocs/op 2497454 ns/op 2386928 B/op 10344 allocs/op 1.04
BenchmarkDocument/tree_split_gc_100 - ns/op 2594942 ns/op 2497454 ns/op 1.04
BenchmarkDocument/tree_split_gc_100 - B/op 2386963 B/op 2386928 B/op 1.00
BenchmarkDocument/tree_split_gc_100 - allocs/op 10344 allocs/op 10344 allocs/op 1
BenchmarkDocument/tree_split_gc_1000 200165483 ns/op 221992730 B/op 112270 allocs/op 186319269 ns/op 221991885 B/op 112264 allocs/op 1.07
BenchmarkDocument/tree_split_gc_1000 - ns/op 200165483 ns/op 186319269 ns/op 1.07
BenchmarkDocument/tree_split_gc_1000 - B/op 221992730 B/op 221991885 B/op 1.00
BenchmarkDocument/tree_split_gc_1000 - allocs/op 112270 allocs/op 112264 allocs/op 1.00
BenchmarkRPC/client_to_server 377669300 ns/op 17076146 B/op 174430 allocs/op 380082655 ns/op 16683285 B/op 172399 allocs/op 0.99
BenchmarkRPC/client_to_server - ns/op 377669300 ns/op 380082655 ns/op 0.99
BenchmarkRPC/client_to_server - B/op 17076146 B/op 16683285 B/op 1.02
BenchmarkRPC/client_to_server - allocs/op 174430 allocs/op 172399 allocs/op 1.01
BenchmarkRPC/client_to_client_via_server 637194458 ns/op 33966952 B/op 319134 allocs/op 629568081 ns/op 33981592 B/op 319705 allocs/op 1.01
BenchmarkRPC/client_to_client_via_server - ns/op 637194458 ns/op 629568081 ns/op 1.01
BenchmarkRPC/client_to_client_via_server - B/op 33966952 B/op 33981592 B/op 1.00
BenchmarkRPC/client_to_client_via_server - allocs/op 319134 allocs/op 319705 allocs/op 1.00
BenchmarkRPC/attach_large_document 1436713448 ns/op 1907725064 B/op 8811 allocs/op 1335841277 ns/op 1895418704 B/op 8820 allocs/op 1.08
BenchmarkRPC/attach_large_document - ns/op 1436713448 ns/op 1335841277 ns/op 1.08
BenchmarkRPC/attach_large_document - B/op 1907725064 B/op 1895418704 B/op 1.01
BenchmarkRPC/attach_large_document - allocs/op 8811 allocs/op 8820 allocs/op 1.00
BenchmarkRPC/adminCli_to_server 553846254 ns/op 35950100 B/op 289513 allocs/op 544328748 ns/op 35947312 B/op 289540 allocs/op 1.02
BenchmarkRPC/adminCli_to_server - ns/op 553846254 ns/op 544328748 ns/op 1.02
BenchmarkRPC/adminCli_to_server - B/op 35950100 B/op 35947312 B/op 1.00
BenchmarkRPC/adminCli_to_server - allocs/op 289513 allocs/op 289540 allocs/op 1.00
BenchmarkLocker 66.6 ns/op 16 B/op 1 allocs/op 65.56 ns/op 16 B/op 1 allocs/op 1.02
BenchmarkLocker - ns/op 66.6 ns/op 65.56 ns/op 1.02
BenchmarkLocker - B/op 16 B/op 16 B/op 1
BenchmarkLocker - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkLockerParallel 39.05 ns/op 0 B/op 0 allocs/op 38.78 ns/op 0 B/op 0 allocs/op 1.01
BenchmarkLockerParallel - ns/op 39.05 ns/op 38.78 ns/op 1.01
BenchmarkLockerParallel - B/op 0 B/op 0 B/op 1
BenchmarkLockerParallel - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkLockerMoreKeys 143 ns/op 15 B/op 0 allocs/op 148.3 ns/op 15 B/op 0 allocs/op 0.96
BenchmarkLockerMoreKeys - ns/op 143 ns/op 148.3 ns/op 0.96
BenchmarkLockerMoreKeys - B/op 15 B/op 15 B/op 1
BenchmarkLockerMoreKeys - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkChange/Push_10_Changes 3886544 ns/op 121675 B/op 1285 allocs/op 3924927 ns/op 121535 B/op 1284 allocs/op 0.99
BenchmarkChange/Push_10_Changes - ns/op 3886544 ns/op 3924927 ns/op 0.99
BenchmarkChange/Push_10_Changes - B/op 121675 B/op 121535 B/op 1.00
BenchmarkChange/Push_10_Changes - allocs/op 1285 allocs/op 1284 allocs/op 1.00
BenchmarkChange/Push_100_Changes 14515624 ns/op 570791 B/op 6654 allocs/op 14819106 ns/op 567416 B/op 6654 allocs/op 0.98
BenchmarkChange/Push_100_Changes - ns/op 14515624 ns/op 14819106 ns/op 0.98
BenchmarkChange/Push_100_Changes - B/op 570791 B/op 567416 B/op 1.01
BenchmarkChange/Push_100_Changes - allocs/op 6654 allocs/op 6654 allocs/op 1
BenchmarkChange/Push_1000_Changes 116325345 ns/op 5224343 B/op 63149 allocs/op 118379209 ns/op 5304520 B/op 63151 allocs/op 0.98
BenchmarkChange/Push_1000_Changes - ns/op 116325345 ns/op 118379209 ns/op 0.98
BenchmarkChange/Push_1000_Changes - B/op 5224343 B/op 5304520 B/op 0.98
BenchmarkChange/Push_1000_Changes - allocs/op 63149 allocs/op 63151 allocs/op 1.00
BenchmarkChange/Pull_10_Changes 2901059 ns/op 101118 B/op 1004 allocs/op 2958048 ns/op 100832 B/op 1005 allocs/op 0.98
BenchmarkChange/Pull_10_Changes - ns/op 2901059 ns/op 2958048 ns/op 0.98
BenchmarkChange/Pull_10_Changes - B/op 101118 B/op 100832 B/op 1.00
BenchmarkChange/Pull_10_Changes - allocs/op 1004 allocs/op 1005 allocs/op 1.00
BenchmarkChange/Pull_100_Changes 4324726 ns/op 267109 B/op 3475 allocs/op 4406165 ns/op 265840 B/op 3475 allocs/op 0.98
BenchmarkChange/Pull_100_Changes - ns/op 4324726 ns/op 4406165 ns/op 0.98
BenchmarkChange/Pull_100_Changes - B/op 267109 B/op 265840 B/op 1.00
BenchmarkChange/Pull_100_Changes - allocs/op 3475 allocs/op 3475 allocs/op 1
BenchmarkChange/Pull_1000_Changes 8558440 ns/op 1492608 B/op 29864 allocs/op 8549199 ns/op 1490942 B/op 29860 allocs/op 1.00
BenchmarkChange/Pull_1000_Changes - ns/op 8558440 ns/op 8549199 ns/op 1.00
BenchmarkChange/Pull_1000_Changes - B/op 1492608 B/op 1490942 B/op 1.00
BenchmarkChange/Pull_1000_Changes - allocs/op 29864 allocs/op 29860 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot 16945606 ns/op 716273 B/op 6655 allocs/op 16972160 ns/op 712689 B/op 6660 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - ns/op 16945606 ns/op 16972160 ns/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - B/op 716273 B/op 712689 B/op 1.01
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op 6655 allocs/op 6660 allocs/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot 120132020 ns/op 5658648 B/op 63155 allocs/op 120056739 ns/op 5571637 B/op 63248 allocs/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - ns/op 120132020 ns/op 120056739 ns/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - B/op 5658648 B/op 5571637 B/op 1.02
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op 63155 allocs/op 63248 allocs/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot 6504350 ns/op 924058 B/op 15512 allocs/op 6482969 ns/op 921951 B/op 15511 allocs/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op 6504350 ns/op 6482969 ns/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - B/op 924058 B/op 921951 B/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op 15512 allocs/op 15511 allocs/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot 15580725 ns/op 7154446 B/op 150104 allocs/op 15254999 ns/op 7151872 B/op 150106 allocs/op 1.02
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op 15580725 ns/op 15254999 ns/op 1.02
BenchmarkSnapshot/Pull_30KB_snapshot - B/op 7154446 B/op 7151872 B/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op 150104 allocs/op 150106 allocs/op 1.00
BenchmarkSync/memory_sync_10_test 6804 ns/op 1286 B/op 38 allocs/op 6930 ns/op 1286 B/op 38 allocs/op 0.98
BenchmarkSync/memory_sync_10_test - ns/op 6804 ns/op 6930 ns/op 0.98
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 50736 ns/op 8646 B/op 273 allocs/op 51262 ns/op 8639 B/op 273 allocs/op 0.99
BenchmarkSync/memory_sync_100_test - ns/op 50736 ns/op 51262 ns/op 0.99
BenchmarkSync/memory_sync_100_test - B/op 8646 B/op 8639 B/op 1.00
BenchmarkSync/memory_sync_100_test - allocs/op 273 allocs/op 273 allocs/op 1
BenchmarkSync/memory_sync_1000_test 578952 ns/op 74210 B/op 2112 allocs/op 582810 ns/op 74289 B/op 2116 allocs/op 0.99
BenchmarkSync/memory_sync_1000_test - ns/op 578952 ns/op 582810 ns/op 0.99
BenchmarkSync/memory_sync_1000_test - B/op 74210 B/op 74289 B/op 1.00
BenchmarkSync/memory_sync_1000_test - allocs/op 2112 allocs/op 2116 allocs/op 1.00
BenchmarkSync/memory_sync_10000_test 7229445 ns/op 733758 B/op 20193 allocs/op 7336676 ns/op 740012 B/op 20264 allocs/op 0.99
BenchmarkSync/memory_sync_10000_test - ns/op 7229445 ns/op 7336676 ns/op 0.99
BenchmarkSync/memory_sync_10000_test - B/op 733758 B/op 740012 B/op 0.99
BenchmarkSync/memory_sync_10000_test - allocs/op 20193 allocs/op 20264 allocs/op 1.00
BenchmarkTextEditing 17798846600 ns/op 9041915520 B/op 19922728 allocs/op 17987208605 ns/op 9041351880 B/op 19920033 allocs/op 0.99
BenchmarkTextEditing - ns/op 17798846600 ns/op 17987208605 ns/op 0.99
BenchmarkTextEditing - B/op 9041915520 B/op 9041351880 B/op 1.00
BenchmarkTextEditing - allocs/op 19922728 allocs/op 19920033 allocs/op 1.00

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

Please sign in to comment.