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 1
1
---
2
- require :
2
+ plugins :
3
3
- rubocop-performance
4
4
- rubocop-rake
5
5
- rubocop-minitest
Original file line number Diff line number Diff line change @@ -16,13 +16,13 @@ def run
16
16
17
17
case mode = ENV . fetch ( 'PROFILE_MODE' , :single ) . to_sym
18
18
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 } " ) }
21
21
end
22
22
when :transaction
23
- execute ( client , mode ) do |client |
23
+ execute ( client , mode ) do |cli |
24
24
ATTEMPTS . times do |i |
25
- client . multi do |tx |
25
+ cli . multi do |tx |
26
26
SIZE . times do |j |
27
27
n = SIZE * i + j
28
28
tx . call ( 'set' , "{group:#{ i } }:key:#{ n } " , n )
@@ -31,9 +31,9 @@ def run
31
31
end
32
32
end
33
33
when :pipeline
34
- execute ( client , mode ) do |client |
34
+ execute ( client , mode ) do |cli |
35
35
ATTEMPTS . times do |i |
36
- client . pipelined do |pi |
36
+ cli . pipelined do |pi |
37
37
SIZE . times do |j |
38
38
n = SIZE * i + j
39
39
pi . call ( 'get' , "key#{ n } " )
Original file line number Diff line number Diff line change 76
76
raise NotImplementedError , TEST_REDIS_HOST
77
77
end
78
78
79
- Ractor . make_shareable ( TEST_NODE_URIS ) if Object . const_defined? ( :Ractor , false ) && Ractor . respond_to? ( :make_shareable )
80
-
81
79
TEST_GENERIC_OPTIONS = ( TEST_REDIS_SSL ? _base_opts . merge ( _ssl_opts ) : _base_opts ) . freeze
82
80
83
81
_tmp_cli = _new_raw_cli . call ( **TEST_GENERIC_OPTIONS )
88
86
BENCH_ENVOY_OPTIONS = { port : 7000 , protocol : 2 } . freeze
89
87
BENCH_REDIS_CLUSTER_PROXY_OPTIONS = { port : 7001 , protocol : 2 } . freeze
90
88
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
+
91
94
# rubocop:enable Lint/UnderscorePrefixedVariableName
You can’t perform that action at this time.
0 commit comments