groonga-query-log 1.3.6 → 1.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8319bb5ebc5e7b1ecc8dddd08e8215f36514bf061f4e72bf288c83c6afd07abe
4
- data.tar.gz: e0736c47cd946dcbd9e91296776ab04b5b66762810e53e374e4db435755cf33a
3
+ metadata.gz: f15d15e5f0ca25ffbd6e5dee08c732a4cebb35b4ad4eaa44fcacca85e0e6b386
4
+ data.tar.gz: 14b68832f85aff8c122477a5d5ed791a5545c370da51ed291588454216e3a6e9
5
5
  SHA512:
6
- metadata.gz: 71e0c2db3e0b084cff5a50743b5aefdf2769c0182ead168e447375a7779e283285826df77e00a265d8f06f63d759c749c8b9e76ec88a7ecb5f8c69b60635801f
7
- data.tar.gz: f1e552888b7d0ec482bae95fc9f206b6e754d383636512474afdeeb120461add496dd538414ca58cd1ae2c2a8ac555c0dfcd0997827c1c5b7ac9026273928d5f
6
+ metadata.gz: b0240ddbc1584dc007f55ad7a742c6b6a7f7c643a6261f08f61bd8ba5a2359e240128d2614be6f7ce1c1be8fe034f1d22906a1222c7ceb507e929c093467b1a8
7
+ data.tar.gz: a95c78d3864012a3711dd3ff2e0d54bab936fafdfd4a2fadafc04131e437272ee057221a16f07fa5f6e8478492ac97fa547a872fe075724800b43d0e34a2fd41
@@ -1,5 +1,17 @@
1
1
  # News
2
2
 
3
+ ## 1.3.7: 2018-09-11
4
+
5
+ ### Improvements
6
+
7
+ * `groonga-query-log-run-regression-test`:
8
+
9
+ * Added support for loading data by Ruby.
10
+
11
+ * `groonga-query-log-check-crash`:
12
+
13
+ * Added lock related logs to important logs.
14
+
3
15
  ## 1.3.6: 2018-08-31
4
16
 
5
17
  ### Improvements
@@ -289,6 +289,11 @@ module GroongaQueryLog
289
289
  GroongaProcess.new(entry.pid, Time.at(0), path)
290
290
  process = @running_processes[entry.pid]
291
291
  case entry.log_level
292
+ when :notice
293
+ case entry.message
294
+ when /lock/
295
+ process.important_entries << entry
296
+ end
292
297
  when :emergency, :alert, :critical, :error
293
298
  process.important_entries << entry
294
299
  end
@@ -277,16 +277,28 @@ module GroongaQueryLog
277
277
  return if @database_path.exist?
278
278
  FileUtils.mkdir_p(@database_path.dirname.to_s)
279
279
  system(@groonga, "-n", @database_path.to_s, "quit")
280
- grn_files.each do |grn_file|
281
- command = [
282
- @groonga,
283
- "--log-path", log_path.to_s,
284
- "--file", grn_file.to_s,
285
- @database_path.to_s,
286
- ]
280
+ load_files.each do |load_file|
281
+ if load_file.extname == ".rb"
282
+ env = {
283
+ "GROONGA_LOG_PATH" => log_path.to_s,
284
+ }
285
+ command = [
286
+ RbConfig.ruby,
287
+ load_file.to_s,
288
+ @database_path.to_s,
289
+ ]
290
+ else
291
+ env = {}
292
+ command = [
293
+ @groonga,
294
+ "--log-path", log_path.to_s,
295
+ "--file", grn_file.to_s,
296
+ @database_path.to_s,
297
+ ]
298
+ end
287
299
  command_line = command.join(" ")
288
300
  puts("Running...: #{command_line}")
289
- pid = spawn(*command)
301
+ pid = spawn(env, *command)
290
302
  begin
291
303
  pid, status = Process.waitpid2(pid)
292
304
  rescue Interrupt
@@ -336,7 +348,7 @@ module GroongaQueryLog
336
348
  end
337
349
  end
338
350
 
339
- def grn_files
351
+ def load_files
340
352
  files = schema_files
341
353
  files += data_files if @options[:load_data]
342
354
  files += index_files
@@ -344,15 +356,15 @@ module GroongaQueryLog
344
356
  end
345
357
 
346
358
  def schema_files
347
- Pathname.glob("#{@input_directory}/schema/**/*.grn").sort
359
+ Pathname.glob("#{@input_directory}/schema/**/*.{grn,rb}").sort
348
360
  end
349
361
 
350
362
  def index_files
351
- Pathname.glob("#{@input_directory}/indexes/**/*.grn").sort
363
+ Pathname.glob("#{@input_directory}/indexes/**/*.{grn,rb}").sort
352
364
  end
353
365
 
354
366
  def data_files
355
- Pathname.glob("#{@input_directory}/data/**/*.grn").sort
367
+ Pathname.glob("#{@input_directory}/data/**/*.{grn,rb}").sort
356
368
  end
357
369
  end
358
370
 
@@ -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.6"
18
+ VERSION = "1.3.7"
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.6
4
+ version: 1.3.7
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-08-31 00:00:00.000000000 Z
11
+ date: 2018-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: groonga-command-parser