File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 11---
2- require :
2+ plugins :
33 - rubocop-performance
44 - rubocop-rake
55 - rubocop-minitest
Original file line number Diff line number Diff line change @@ -16,13 +16,13 @@ def run
1616
1717 case mode = ENV . fetch ( 'PROFILE_MODE' , :single ) . to_sym
1818 when :single
19- execute ( client , mode ) do |client |
20- ATTEMPTS . times { |i | client . call ( 'get' , "key#{ i } " ) }
19+ execute ( client , mode ) do |cli |
20+ ATTEMPTS . times { |i | cli . call ( 'get' , "key#{ i } " ) }
2121 end
2222 when :transaction
23- execute ( client , mode ) do |client |
23+ execute ( client , mode ) do |cli |
2424 ATTEMPTS . times do |i |
25- client . multi do |tx |
25+ cli . multi do |tx |
2626 SIZE . times do |j |
2727 n = SIZE * i + j
2828 tx . call ( 'set' , "{group:#{ i } }:key:#{ n } " , n )
@@ -31,9 +31,9 @@ def run
3131 end
3232 end
3333 when :pipeline
34- execute ( client , mode ) do |client |
34+ execute ( client , mode ) do |cli |
3535 ATTEMPTS . times do |i |
36- client . pipelined do |pi |
36+ cli . pipelined do |pi |
3737 SIZE . times do |j |
3838 n = SIZE * i + j
3939 pi . call ( 'get' , "key#{ n } " )
Original file line number Diff line number Diff line change 7676 raise NotImplementedError , TEST_REDIS_HOST
7777end
7878
79- Ractor . make_shareable ( TEST_NODE_URIS ) if Object . const_defined? ( :Ractor , false ) && Ractor . respond_to? ( :make_shareable )
80-
8179TEST_GENERIC_OPTIONS = ( TEST_REDIS_SSL ? _base_opts . merge ( _ssl_opts ) : _base_opts ) . freeze
8280
8381_tmp_cli = _new_raw_cli . call ( **TEST_GENERIC_OPTIONS )
8886BENCH_ENVOY_OPTIONS = { port : 7000 , protocol : 2 } . freeze
8987BENCH_REDIS_CLUSTER_PROXY_OPTIONS = { port : 7001 , protocol : 2 } . freeze
9088
89+ if Object . const_defined? ( :Ractor , false ) && Ractor . respond_to? ( :make_shareable )
90+ Ractor . make_shareable ( TEST_NODE_URIS )
91+ Ractor . make_shareable ( TEST_GENERIC_OPTIONS )
92+ end
93+
9194# rubocop:enable Lint/UnderscorePrefixedVariableName
You can’t perform that action at this time.
0 commit comments