groonga-query-log 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f93f3372ace5058cc9f8b7eb9f4799ad841862ca62bb7a7045564dd509b700c
4
- data.tar.gz: 274f551095b12c0d7ce61f8f3c7be8d3b55531fcf7acf06df74fedc034f918ec
3
+ metadata.gz: ced33fc1e79df9965df29521aad93a35af71fdf48cf3a040aba8a29e56f75b98
4
+ data.tar.gz: 4ee6fa7d32c4326eaa817dc636fac696bda773b968860715e9af8290e446be06
5
5
  SHA512:
6
- metadata.gz: 927ce37d21309f8def6a273c01b6b16a2c21d125a4db976f35bc16df211f81393a14cef1148ff9ac79d6488aa84ea3fdcdba26a69744ec32d605c66726bf3266
7
- data.tar.gz: e509b9cfa830dcaf232ab4bf6692741afc44acc03b0fbe78c0135e52dc19a8911e12a18e61581925eb2d448790226ea93dc0c5b6821d06459176d6b7a8ae1e83
6
+ metadata.gz: 0ff81edec5d8b43878806d1923e487cb2aa28600ae78304ef8b2a13f60a1d78f94a4c0992c8cd0cf78f98ba90c8c4e200bab351eb01b65a19169649a0dd009c2
7
+ data.tar.gz: '0955ac7ae9a4f3969e336c949c76bd9aed6af824d0ba453b9cd5527b3628812e74358ec695b04f202032e1999d4049a3e9d4b19313851f206e616b4ef154cf95'
@@ -1,5 +1,23 @@
1
1
  # News
2
2
 
3
+ ## 1.3.2: 2018-07-03
4
+
5
+ ### Improvements
6
+
7
+ * `groonga-query-log-run-regression-test`:
8
+
9
+ * Added `--target-command-names` option.
10
+
11
+ * Added `--read-timeout` option.
12
+
13
+ * `groonga-query-log-verify-server`:
14
+
15
+ * Added `--groonga1-read-timeout` option.
16
+
17
+ * Added `--groonga2-read-timeout` option.
18
+
19
+ * Added `--read-timeout` option.
20
+
3
21
  ## 1.3.1: 2018-06-18
4
22
 
5
23
  ### Improvements
@@ -44,9 +44,13 @@ module GroongaQueryLog
44
44
  @run_queries = true
45
45
  @skip_finished_queries = false
46
46
  @output_query_log = false
47
+ @stop_on_failure = false
48
+
47
49
  @care_order = true
48
50
  @ignored_drilldown_keys = []
49
- @stop_on_failure = false
51
+ @target_command_names = ServerVerifier::Options.new.target_command_names
52
+
53
+ @read_timeout = Groonga::Client::Default::READ_TIMEOUT
50
54
  end
51
55
 
52
56
  def run(command_line)
@@ -142,6 +146,14 @@ module GroongaQueryLog
142
146
  "Output query log in verified target Groonga servers") do
143
147
  @output_query_log = true
144
148
  end
149
+ parser.on("--[no-]stop-on-failure",
150
+ "Stop execution on the first failure",
151
+ "(#{@stop_on_failure})") do |boolean|
152
+ @stop_on_failure = boolean
153
+ end
154
+
155
+ parser.separator("")
156
+ parser.separator("Comparisons:")
145
157
  parser.on("--no-care-order",
146
158
  "Don't care order of select response records") do
147
159
  @care_order = false
@@ -152,10 +164,21 @@ module GroongaQueryLog
152
164
  "specifying this option multiple times") do |key|
153
165
  @ignored_drilldown_keys << key
154
166
  end
155
- parser.on("--[no-]stop-on-failure",
156
- "Stop execution on the first failure",
157
- "(#{@stop_on_failure})") do |boolean|
158
- @stop_on_failure = boolean
167
+ target_command_names_label = @target_command_names.join(",")
168
+ parser.on("--target-command-names=NAME1,NAME2,...", Array,
169
+ "Test only NAME1,NAME2,... commands",
170
+ "You can use glob to choose command name",
171
+ "[#{target_command_names_label}]") do |names|
172
+ @target_command_names = names
173
+ end
174
+
175
+ parser.separator("")
176
+ parser.separator("Network:")
177
+ parser.on("--read-timeout=TIMEOUT", Integer,
178
+ "Timeout on reading response from Groonga servers.",
179
+ "You can disable timeout by specifying -1.",
180
+ "[#{@read_timeout}]") do |timeout|
181
+ @read_timeout = timeout
159
182
  end
160
183
 
161
184
  parser
@@ -185,6 +208,8 @@ module GroongaQueryLog
185
208
  :skip_finished_queries => @skip_finished_queries,
186
209
  :ignored_drilldown_keys => @ignored_drilldown_keys,
187
210
  :stop_on_failure => @stop_on_failure,
211
+ :target_command_names => @target_command_names,
212
+ :read_timeout => @read_timeout,
188
213
  }
189
214
  directory_options.merge(options)
190
215
  end
@@ -436,6 +461,14 @@ module GroongaQueryLog
436
461
  if @stop_on_failure
437
462
  command_line << "--stop-on-failure"
438
463
  end
464
+ if @options[:target_command_names]
465
+ command_line << "--target-command-names"
466
+ command_line << @options[:target_command_names].join(",")
467
+ end
468
+ if @options[:read_timeout]
469
+ command_line << "--read-timeout"
470
+ command_line << @options[:read_timeout].to_s
471
+ end
439
472
  verify_server = VerifyServer.new
440
473
  verify_server.run(command_line, &callback)
441
474
  end
@@ -73,6 +73,13 @@ module GroongaQueryLog
73
73
  @options.groonga1.protocol = protocol
74
74
  end
75
75
 
76
+ parser.on("--groonga1-read-timeout=TIMEOUT", Integer,
77
+ "Timeout on reading response from Groonga server 1.",
78
+ "You can disable timeout by specifying -1.",
79
+ "(#{@options.groonga1.read_timeout})") do |timeout|
80
+ @options.groonga1.read_timeout = timeout
81
+ end
82
+
76
83
  parser.on("--groonga2-host=HOST",
77
84
  "Host name or IP address of Groonga server 2",
78
85
  "[#{@options.groonga2.host}]") do |host|
@@ -91,6 +98,20 @@ module GroongaQueryLog
91
98
  @options.groonga2.protocol = protocol
92
99
  end
93
100
 
101
+ parser.on("--groonga2-read-timeout=TIMEOUT", Integer,
102
+ "Timeout on reading response from Groonga server 2.",
103
+ "You can disable timeout by specifying -1.",
104
+ "(#{@options.groonga2.read_timeout})") do |timeout|
105
+ @options.groonga2.read_timeout = timeout
106
+ end
107
+
108
+ parser.on("--read-timeout=TIMEOUT", Integer,
109
+ "Timeout on reading response from both Groonga servers.",
110
+ "You can disable timeout by specifying -1.") do |timeout|
111
+ @options.groonga1.read_timeout = timeout
112
+ @options.groonga2.read_timeout = timeout
113
+ end
114
+
94
115
  parser.on("--n-clients=N", Integer,
95
116
  "The max number of concurrency",
96
117
  "[#{@options.n_clients}]") do |n_clients|
@@ -116,7 +137,7 @@ module GroongaQueryLog
116
137
  @options.target_command_names << name
117
138
  end
118
139
 
119
- target_command_names_label = @options.target_command_names.join(", ")
140
+ target_command_names_label = @options.target_command_names.join(",")
120
141
  parser.on("--target-command-names=NAME1,NAME2,...", Array,
121
142
  "Replay only NAME1,NAME2,... commands",
122
143
  "You can use glob to choose command name",
@@ -245,16 +245,19 @@ module GroongaQueryLog
245
245
  attr_accessor :host
246
246
  attr_accessor :port
247
247
  attr_accessor :protocol
248
+ attr_accessor :read_timeout
248
249
  def initialize
249
- @host = "127.0.0.1"
250
- @port = 10041
251
- @protocol = :gqtp
250
+ @host = "127.0.0.1"
251
+ @port = 10041
252
+ @protocol = :gqtp
253
+ @read_timeout = Groonga::Client::Default::READ_TIMEOUT
252
254
  end
253
255
 
254
256
  def create_client(&block)
255
- Groonga::Client.open(:host => @host,
256
- :port => @port,
257
- :protocol => @protocol,
257
+ Groonga::Client.open(:host => @host,
258
+ :port => @port,
259
+ :protocol => @protocol,
260
+ :read_timeout => @read_timeout,
258
261
  &block)
259
262
  end
260
263
  end
@@ -15,5 +15,5 @@
15
15
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
  module GroongaQueryLog
18
- VERSION = "1.3.1"
18
+ VERSION = "1.3.2"
19
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groonga-query-log
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-18 00:00:00.000000000 Z
11
+ date: 2018-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: groonga-command-parser
@@ -313,7 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
313
313
  version: '0'
314
314
  requirements: []
315
315
  rubyforge_project:
316
- rubygems_version: 3.0.0.beta1
316
+ rubygems_version: 2.7.6
317
317
  signing_key:
318
318
  specification_version: 4
319
319
  summary: Groonga-query-log is a collection of library and tools to process [Groonga](http://groonga.org/)'s