Skip to content

Commit

Permalink
Revise client interceptor for streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
krapie committed Dec 7, 2023
1 parent b2a6ff8 commit 1f22ad8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions client/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ func (i *AuthInterceptor) WrapStreamingClient(next connect.StreamingClientFunc)
ctx context.Context,
spec connect.Spec,
) connect.StreamingClientConn {
ctx.Value(types.APIKeyKey)
return next(ctx, spec)
conn := next(ctx, spec)
conn.RequestHeader().Set(types.APIKeyKey, i.apiKey)

return conn
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/integration/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//gdo:build integration
//go:build integration

/*
* Copyright 2020 The Yorkie Authors. All rights reserved.
Expand Down

1 comment on commit 1f22ad8

@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: 1f22ad8 Previous: 3ebef65 Ratio
BenchmarkDocument/constructor_test - ns/op 1327 ns/op 1373 ns/op 0.97
BenchmarkDocument/constructor_test - B/op 1208 B/op 1208 B/op 1
BenchmarkDocument/constructor_test - allocs/op 20 allocs/op 20 allocs/op 1
BenchmarkDocument/status_test - ns/op 793.8 ns/op 796.5 ns/op 1.00
BenchmarkDocument/status_test - B/op 1176 B/op 1176 B/op 1
BenchmarkDocument/status_test - allocs/op 18 allocs/op 18 allocs/op 1
BenchmarkDocument/equals_test - ns/op 7096 ns/op 8302 ns/op 0.85
BenchmarkDocument/equals_test - B/op 6913 B/op 6913 B/op 1
BenchmarkDocument/equals_test - allocs/op 120 allocs/op 120 allocs/op 1
BenchmarkDocument/nested_update_test - ns/op 15965 ns/op 16598 ns/op 0.96
BenchmarkDocument/nested_update_test - B/op 11962 B/op 11962 B/op 1
BenchmarkDocument/nested_update_test - allocs/op 254 allocs/op 254 allocs/op 1
BenchmarkDocument/delete_test - ns/op 21701 ns/op 22626 ns/op 0.96
BenchmarkDocument/delete_test - B/op 15188 B/op 15188 B/op 1
BenchmarkDocument/delete_test - allocs/op 333 allocs/op 333 allocs/op 1
BenchmarkDocument/object_test - ns/op 8807 ns/op 8699 ns/op 1.01
BenchmarkDocument/object_test - B/op 6721 B/op 6721 B/op 1
BenchmarkDocument/object_test - allocs/op 116 allocs/op 116 allocs/op 1
BenchmarkDocument/array_test - ns/op 30187 ns/op 29401 ns/op 1.03
BenchmarkDocument/array_test - B/op 11819 B/op 11819 B/op 1
BenchmarkDocument/array_test - allocs/op 270 allocs/op 270 allocs/op 1
BenchmarkDocument/text_test - ns/op 30312 ns/op 31226 ns/op 0.97
BenchmarkDocument/text_test - B/op 14795 B/op 14795 B/op 1
BenchmarkDocument/text_test - allocs/op 468 allocs/op 468 allocs/op 1
BenchmarkDocument/text_composition_test - ns/op 28977 ns/op 29299 ns/op 0.99
BenchmarkDocument/text_composition_test - B/op 18278 B/op 18278 B/op 1
BenchmarkDocument/text_composition_test - allocs/op 477 allocs/op 477 allocs/op 1
BenchmarkDocument/rich_text_test - ns/op 79973 ns/op 82820 ns/op 0.97
BenchmarkDocument/rich_text_test - B/op 38540 B/op 38540 B/op 1
BenchmarkDocument/rich_text_test - allocs/op 1147 allocs/op 1147 allocs/op 1
BenchmarkDocument/counter_test - ns/op 16574 ns/op 17386 ns/op 0.95
BenchmarkDocument/counter_test - B/op 10210 B/op 10210 B/op 1
BenchmarkDocument/counter_test - allocs/op 236 allocs/op 236 allocs/op 1
BenchmarkDocument/text_edit_gc_100 - ns/op 2867548 ns/op 2970186 ns/op 0.97
BenchmarkDocument/text_edit_gc_100 - B/op 1655152 B/op 1655326 B/op 1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op 17091 allocs/op 17093 allocs/op 1.00
BenchmarkDocument/text_edit_gc_1000 - ns/op 226609404 ns/op 231735416 ns/op 0.98
BenchmarkDocument/text_edit_gc_1000 - B/op 144343300 B/op 144366033 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 200910 allocs/op 201007 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 - ns/op 3345491 ns/op 3385194 ns/op 0.99
BenchmarkDocument/text_split_gc_100 - B/op 2313477 B/op 2313331 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 16193 allocs/op 16194 allocs/op 1.00
BenchmarkDocument/text_split_gc_1000 - ns/op 285526748 ns/op 296761342 ns/op 0.96
BenchmarkDocument/text_split_gc_1000 - B/op 228896392 B/op 228881832 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 203970 allocs/op 203904 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 - ns/op 10408665 ns/op 11146892 ns/op 0.93
BenchmarkDocument/text_delete_all_10000 - B/op 5809439 B/op 5810543 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 40670 allocs/op 40675 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 - ns/op 181107981 ns/op 187188955 ns/op 0.97
BenchmarkDocument/text_delete_all_100000 - B/op 81903141 B/op 81887592 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 411625 allocs/op 411550 allocs/op 1.00
BenchmarkDocument/text_100 - ns/op 231813 ns/op 232235 ns/op 1.00
BenchmarkDocument/text_100 - B/op 118483 B/op 118483 B/op 1
BenchmarkDocument/text_100 - allocs/op 5080 allocs/op 5080 allocs/op 1
BenchmarkDocument/text_1000 - ns/op 2475477 ns/op 2502773 ns/op 0.99
BenchmarkDocument/text_1000 - B/op 1153072 B/op 1153073 B/op 1.00
BenchmarkDocument/text_1000 - allocs/op 50084 allocs/op 50084 allocs/op 1
BenchmarkDocument/array_1000 - ns/op 1242559 ns/op 1267389 ns/op 0.98
BenchmarkDocument/array_1000 - B/op 1091279 B/op 1091268 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11826 allocs/op 11826 allocs/op 1
BenchmarkDocument/array_10000 - ns/op 13318335 ns/op 13549731 ns/op 0.98
BenchmarkDocument/array_10000 - B/op 9798620 B/op 9800047 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120286 allocs/op 120291 allocs/op 1.00
BenchmarkDocument/array_gc_100 - ns/op 152079 ns/op 153664 ns/op 0.99
BenchmarkDocument/array_gc_100 - B/op 132496 B/op 132498 B/op 1.00
BenchmarkDocument/array_gc_100 - allocs/op 1248 allocs/op 1248 allocs/op 1
BenchmarkDocument/array_gc_1000 - ns/op 1432227 ns/op 1451255 ns/op 0.99
BenchmarkDocument/array_gc_1000 - B/op 1158927 B/op 1158965 B/op 1.00
BenchmarkDocument/array_gc_1000 - allocs/op 12864 allocs/op 12865 allocs/op 1.00
BenchmarkDocument/counter_1000 - ns/op 213669 ns/op 215664 ns/op 0.99
BenchmarkDocument/counter_1000 - B/op 192853 B/op 192852 B/op 1.00
BenchmarkDocument/counter_1000 - allocs/op 5765 allocs/op 5765 allocs/op 1
BenchmarkDocument/counter_10000 - ns/op 2210180 ns/op 2222359 ns/op 0.99
BenchmarkDocument/counter_10000 - B/op 2087767 B/op 2087783 B/op 1.00
BenchmarkDocument/counter_10000 - allocs/op 59772 allocs/op 59772 allocs/op 1
BenchmarkDocument/object_1000 - ns/op 1410201 ns/op 1433455 ns/op 0.98
BenchmarkDocument/object_1000 - B/op 1427874 B/op 1427946 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9844 allocs/op 9845 allocs/op 1.00
BenchmarkDocument/object_10000 - ns/op 14649571 ns/op 14878581 ns/op 0.98
BenchmarkDocument/object_10000 - B/op 12166623 B/op 12167003 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 100560 allocs/op 100561 allocs/op 1.00
BenchmarkDocument/tree_100 - ns/op 1080447 ns/op 722947 ns/op 1.49
BenchmarkDocument/tree_100 - B/op 943678 B/op 442891 B/op 2.13
BenchmarkDocument/tree_100 - allocs/op 6099 allocs/op 4506 allocs/op 1.35
BenchmarkDocument/tree_1000 - ns/op 79566708 ns/op 48715965 ns/op 1.63
BenchmarkDocument/tree_1000 - B/op 86460523 B/op 35222566 B/op 2.45
BenchmarkDocument/tree_1000 - allocs/op 60113 allocs/op 44119 allocs/op 1.36
BenchmarkDocument/tree_10000 - ns/op 9883741190 ns/op 6243742972 ns/op 1.58
BenchmarkDocument/tree_10000 - B/op 8580975272 B/op 3439193776 B/op 2.50
BenchmarkDocument/tree_10000 - allocs/op 600231 allocs/op 440204 allocs/op 1.36
BenchmarkDocument/tree_delete_all_1000 - ns/op 77800706 ns/op 50492483 ns/op 1.54
BenchmarkDocument/tree_delete_all_1000 - B/op 86990919 B/op 35687345 B/op 2.44
BenchmarkDocument/tree_delete_all_1000 - allocs/op 67752 allocs/op 51744 allocs/op 1.31
BenchmarkDocument/tree_edit_gc_100 - ns/op 3863892 ns/op 2674319 ns/op 1.44
BenchmarkDocument/tree_edit_gc_100 - B/op 4120937 B/op 2099522 B/op 1.96
BenchmarkDocument/tree_edit_gc_100 - allocs/op 14356 allocs/op 11165 allocs/op 1.29
BenchmarkDocument/tree_edit_gc_1000 - ns/op 317789981 ns/op 200656697 ns/op 1.58
BenchmarkDocument/tree_edit_gc_1000 - B/op 383469222 B/op 180293307 B/op 2.13
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 145439 allocs/op 113350 allocs/op 1.28
BenchmarkDocument/tree_split_gc_100 - ns/op 2673868 ns/op 1969140 ns/op 1.36
BenchmarkDocument/tree_split_gc_100 - B/op 2386840 B/op 1363475 B/op 1.75
BenchmarkDocument/tree_split_gc_100 - allocs/op 10341 allocs/op 8735 allocs/op 1.18
BenchmarkDocument/tree_split_gc_1000 - ns/op 191954637 ns/op 133034523 ns/op 1.44
BenchmarkDocument/tree_split_gc_1000 - B/op 221991694 B/op 120284053 B/op 1.85
BenchmarkDocument/tree_split_gc_1000 - allocs/op 112263 allocs/op 96193 allocs/op 1.17
BenchmarkRPC/client_to_server - ns/op 351769240 ns/op 356375965 ns/op 0.99
BenchmarkRPC/client_to_server - B/op 16340773 B/op 16323573 B/op 1.00
BenchmarkRPC/client_to_server - allocs/op 166473 allocs/op 165420 allocs/op 1.01
BenchmarkRPC/client_to_client_via_server - ns/op 602238176 ns/op 607723810 ns/op 0.99
BenchmarkRPC/client_to_client_via_server - B/op 31562084 B/op 34041892 B/op 0.93
BenchmarkRPC/client_to_client_via_server - allocs/op 311564 allocs/op 309871 allocs/op 1.01
BenchmarkRPC/attach_large_document - ns/op 1268717876 ns/op 1463602622 ns/op 0.87
BenchmarkRPC/attach_large_document - B/op 1878648416 B/op 1878647264 B/op 1.00
BenchmarkRPC/attach_large_document - allocs/op 7102 allocs/op 7043 allocs/op 1.01
BenchmarkRPC/adminCli_to_server - ns/op 532084708 ns/op 541741676 ns/op 0.98
BenchmarkRPC/adminCli_to_server - B/op 35575244 B/op 36380716 B/op 0.98
BenchmarkRPC/adminCli_to_server - allocs/op 285590 allocs/op 284616 allocs/op 1.00
BenchmarkLocker - ns/op 65.37 ns/op 65.29 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 - ns/op 37.91 ns/op 38.64 ns/op 0.98
BenchmarkLockerParallel - B/op 0 B/op 0 B/op NaN
BenchmarkLockerParallel - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkLockerMoreKeys - ns/op 146.9 ns/op 138.5 ns/op 1.06
BenchmarkLockerMoreKeys - B/op 15 B/op 15 B/op 1
BenchmarkLockerMoreKeys - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkChange/Push_10_Changes - ns/op 3758173 ns/op 3779429 ns/op 0.99
BenchmarkChange/Push_10_Changes - B/op 126275 B/op 126275 B/op 1
BenchmarkChange/Push_10_Changes - allocs/op 1254 allocs/op 1254 allocs/op 1
BenchmarkChange/Push_100_Changes - ns/op 14076513 ns/op 14129092 ns/op 1.00
BenchmarkChange/Push_100_Changes - B/op 650347 B/op 646942 B/op 1.01
BenchmarkChange/Push_100_Changes - allocs/op 6539 allocs/op 6540 allocs/op 1.00
BenchmarkChange/Push_1000_Changes - ns/op 113746184 ns/op 113213707 ns/op 1.00
BenchmarkChange/Push_1000_Changes - B/op 5980272 B/op 6011043 B/op 0.99
BenchmarkChange/Push_1000_Changes - allocs/op 62155 allocs/op 62155 allocs/op 1
BenchmarkChange/Pull_10_Changes - ns/op 2832264 ns/op 2837624 ns/op 1.00
BenchmarkChange/Pull_10_Changes - B/op 100785 B/op 100327 B/op 1.00
BenchmarkChange/Pull_10_Changes - allocs/op 952 allocs/op 951 allocs/op 1.00
BenchmarkChange/Pull_100_Changes - ns/op 4295226 ns/op 4303014 ns/op 1.00
BenchmarkChange/Pull_100_Changes - B/op 258029 B/op 257269 B/op 1.00
BenchmarkChange/Pull_100_Changes - allocs/op 3154 allocs/op 3154 allocs/op 1
BenchmarkChange/Pull_1000_Changes - ns/op 8314223 ns/op 8473189 ns/op 0.98
BenchmarkChange/Pull_1000_Changes - B/op 1395445 B/op 1393414 B/op 1.00
BenchmarkChange/Pull_1000_Changes - allocs/op 26873 allocs/op 26869 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - ns/op 16886684 ns/op 16717315 ns/op 1.01
BenchmarkSnapshot/Push_3KB_snapshot - B/op 796073 B/op 807884 B/op 0.99
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op 6541 allocs/op 6541 allocs/op 1
BenchmarkSnapshot/Push_30KB_snapshot - ns/op 117319172 ns/op 117501595 ns/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - B/op 6296924 B/op 6250940 B/op 1.01
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op 62162 allocs/op 62161 allocs/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op 6503305 ns/op 6521588 ns/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - B/op 905197 B/op 904310 B/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op 14877 allocs/op 14878 allocs/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op 14876927 ns/op 15228711 ns/op 0.98
BenchmarkSnapshot/Pull_30KB_snapshot - B/op 6982440 B/op 6983077 B/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op 144139 allocs/op 144141 allocs/op 1.00
BenchmarkSync/memory_sync_10_test - ns/op 6937 ns/op 6917 ns/op 1.00
BenchmarkSync/memory_sync_10_test - B/op 1286 B/op 1286 B/op 1
BenchmarkSync/memory_sync_10_test - allocs/op 38 allocs/op 38 allocs/op 1
BenchmarkSync/memory_sync_100_test - ns/op 52738 ns/op 51493 ns/op 1.02
BenchmarkSync/memory_sync_100_test - B/op 8643 B/op 8650 B/op 1.00
BenchmarkSync/memory_sync_100_test - allocs/op 273 allocs/op 273 allocs/op 1
BenchmarkSync/memory_sync_1000_test - ns/op 586934 ns/op 598451 ns/op 0.98
BenchmarkSync/memory_sync_1000_test - B/op 74523 B/op 74330 B/op 1.00
BenchmarkSync/memory_sync_1000_test - allocs/op 2121 allocs/op 2108 allocs/op 1.01
BenchmarkSync/memory_sync_10000_test - ns/op 7175577 ns/op 7141413 ns/op 1.00
BenchmarkSync/memory_sync_10000_test - B/op 759459 B/op 761330 B/op 1.00
BenchmarkSync/memory_sync_10000_test - allocs/op 20545 allocs/op 20560 allocs/op 1.00
BenchmarkTextEditing - ns/op 18386846228 ns/op 19117165431 ns/op 0.96
BenchmarkTextEditing - B/op 9037807184 B/op 9037584392 B/op 1.00
BenchmarkTextEditing - allocs/op 19922532 allocs/op 19921383 allocs/op 1.00

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

Please sign in to comment.