groonga-query-log 1.4.0 → 1.4.1

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.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/doc/text/news.md +14 -0
  3. data/lib/groonga-query-log/command/run-regression-test.rb +136 -2
  4. data/lib/groonga-query-log/parser.rb +16 -9
  5. data/lib/groonga-query-log/statistic.rb +1 -0
  6. data/lib/groonga-query-log/version.rb +2 -2
  7. data/test/command/test-run-regression-test.rb +128 -0
  8. data/test/fixtures/run-regression-test/db.new/db +0 -0
  9. data/test/fixtures/run-regression-test/db.new/db.0000000 +0 -0
  10. data/test/fixtures/run-regression-test/db.new/db.0000100 +0 -0
  11. data/test/fixtures/run-regression-test/db.new/db.0000101 +0 -0
  12. data/test/fixtures/run-regression-test/db.new/db.0000102 +0 -0
  13. data/test/fixtures/run-regression-test/db.new/db.0000103 +0 -0
  14. data/test/fixtures/run-regression-test/db.new/db.0000103.c +0 -0
  15. data/test/fixtures/run-regression-test/db.new/db.001 +0 -0
  16. data/test/fixtures/run-regression-test/db.new/db.conf +0 -0
  17. data/test/fixtures/run-regression-test/db.new/groonga.log +165 -0
  18. data/test/fixtures/run-regression-test/db.old/db +0 -0
  19. data/test/fixtures/run-regression-test/db.old/db.0000000 +0 -0
  20. data/test/fixtures/run-regression-test/db.old/db.0000100 +0 -0
  21. data/test/fixtures/run-regression-test/db.old/db.0000101 +0 -0
  22. data/test/fixtures/run-regression-test/db.old/db.0000102 +0 -0
  23. data/test/fixtures/run-regression-test/db.old/db.0000103 +0 -0
  24. data/test/fixtures/run-regression-test/db.old/db.0000103.c +0 -0
  25. data/test/fixtures/run-regression-test/db.old/db.001 +0 -0
  26. data/test/fixtures/run-regression-test/db.old/db.conf +0 -0
  27. data/test/fixtures/run-regression-test/db.old/groonga.log +79 -0
  28. data/test/fixtures/run-regression-test/results/query.log +0 -0
  29. data/test/test-parser.rb +69 -3
  30. metadata +78 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 815281fff50a93e07460fc0bb35ea453cfc8b36881f685facf2dc61b6481b564
4
- data.tar.gz: 6fb79fe569bb61b35dbe7f876348be12c236791cfc53a25118c134f286974ebe
3
+ metadata.gz: 285c9ab6fc720b1f13bab6a59875e7a29829cfc12a2ba1220d78621391b88b44
4
+ data.tar.gz: 26547ca64e0ff435a54b94e2b5a65d38e7d31f1dfbb7f4a040bf7cf9ffef8fab
5
5
  SHA512:
6
- metadata.gz: '083d46ede2bcb5ef1902210dcd2b4b67b95ec475704efd4c3c768827772e67fd667e6d8dc53b0d250ed5a5896366af5e7ff9b42d5708f5c3b0c90b6143d3bd6f'
7
- data.tar.gz: 8d5f90bf96d8815f8c4dccdca755d3e49b13f5586b56e90d5ddd3f4af5561480b3394ed3a62c6c5b2ba5662e88fceab1a5d36c07280307a4e25094cc9fd7c8ae
6
+ metadata.gz: 9814687fd086b19c731d938f274f690b94322716a26e1a4672f2e3d63ff2c579a1f9a667163da559df0c45afd9cdaa9af20760b916042f06787c39a7dad1474e
7
+ data.tar.gz: e705b82a38091ac40eae7e36228b5423b162e65088316065019a72b9153543dab4f2570c9a81ee6ec3535cf9281ba8515c138ab3ee9dc1a65e983d5c623e7509
data/doc/text/news.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # News
2
2
 
3
+ ## 1.4.1: 2019-05-09
4
+
5
+ ### Improvements
6
+
7
+ * `groonga-query-log-run-regression-test`:
8
+
9
+ * Added support for notifying by e-mail.
10
+
11
+ * Added support for `flush`.
12
+
13
+ * Added `:raw_message` to operation.
14
+
15
+ * Added support for `drilldowns[LABEL].adjust`.
16
+
3
17
  ## 1.4.0: 2019-03-13
4
18
 
5
19
  ### Improvements
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2014-2018 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2014-2019 Kouhei Sutou <kou@clear-code.com>
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -20,8 +20,12 @@ require "socket"
20
20
  require "fileutils"
21
21
  require "pathname"
22
22
  require "net/http"
23
+ require "net/smtp"
24
+ require "time"
25
+ require "base64"
23
26
 
24
27
  require "groonga-query-log"
28
+ require "groonga-query-log/command/format-regression-test-logs"
25
29
  require "groonga-query-log/command/verify-server"
26
30
 
27
31
  module GroongaQueryLog
@@ -57,6 +61,18 @@ module GroongaQueryLog
57
61
  @target_command_names = ServerVerifier::Options.new.target_command_names
58
62
 
59
63
  @read_timeout = Groonga::Client::Default::READ_TIMEOUT
64
+
65
+ @notifier_options = {
66
+ mail_subject_on_success: "Success",
67
+ mail_subject_on_failure: "Failure",
68
+ mail_from: "groonga-query-log@#{Socket.gethostname}",
69
+ mail_to: nil,
70
+ smtp_server: "localhost",
71
+ smtp_auth_user: nil,
72
+ smtp_auth_password: nil,
73
+ smtp_starttls: false,
74
+ smtp_port: 25,
75
+ }
60
76
  end
61
77
 
62
78
  def run(command_line)
@@ -68,10 +84,18 @@ module GroongaQueryLog
68
84
  return false
69
85
  end
70
86
 
87
+ @start_time = Time.now
71
88
  tester = Tester.new(old_groonga_server,
72
89
  new_groonga_server,
73
90
  tester_options)
74
- tester.run
91
+ success = tester.run
92
+
93
+ notifier = MailNotifier.new(success,
94
+ Time.now - @start_time,
95
+ @notifier_options)
96
+ notifier.notify
97
+
98
+ success
75
99
  end
76
100
 
77
101
  private
@@ -226,6 +250,48 @@ module GroongaQueryLog
226
250
  @read_timeout = timeout
227
251
  end
228
252
 
253
+ parser.separator("")
254
+ parser.separator("Notifications:")
255
+ parser.on("--smtp-server=SERVER",
256
+ "Use SERVER as SMTP server",
257
+ "(#{@notifier_options[:smtp_server]})") do |server|
258
+ @notifier_options[:smtp_server] = server
259
+ end
260
+ parser.on("--smtp-auth-user=USER",
261
+ "Use USER for SMTP AUTH",
262
+ "(#{@notifier_options[:smtp_auth_user]})") do |user|
263
+ @notifier_options[:smtp_auth_user] = user
264
+ end
265
+ parser.on("--smtp-auth-password=PASSWORD",
266
+ "Use PASSWORD for SMTP AUTH",
267
+ "(#{@notifier_options[:smtp_auth_password]})") do |password|
268
+ @notifier_options[:smtp_auth_password] = password
269
+ end
270
+ parser.on("--[no-]smtp-starttls",
271
+ "Whether use StartTLS in SMTP or not",
272
+ "(#{@notifier_options[:smtp_starttls]})") do |boolean|
273
+ @notifier_options[:smtp_starttls] = boolean
274
+ end
275
+ parser.on("--smtp-port=PORT", Integer,
276
+ "Use PORT as SMTP server port",
277
+ "(#{@notifier_options[:smtp_port]})") do |port|
278
+ @notifier_options[:smtp_port] = port
279
+ end
280
+ parser.on("--mail-to=TO",
281
+ "Send a notification e-mail to TO",
282
+ "(#{@notifier_options[:mail_to]})") do |to|
283
+ @notifier_options[:mail_to] = to
284
+ end
285
+ parser.on("--mail-subject-on-success=SUBJECT",
286
+ "Use SUBJECT as subject for notification e-mail on success",
287
+ "(#{@notifier_options[:mail_subject_on_success]})") do |subject|
288
+ @notifier_options[:mail_subject_on_success] = subject
289
+ end
290
+ parser.on("--mail-subject-on-failure=SUBJECT",
291
+ "Use SUBJECT as subject for notification e-mail on failure",
292
+ "(#{@notifier_options[:mail_subject_on_failure]})") do |subject|
293
+ @notifier_options[:mail_subject_on_failure] = subject
294
+ end
229
295
  parser
230
296
  end
231
297
 
@@ -585,6 +651,74 @@ module GroongaQueryLog
585
651
  @old.use_persistent_cache? or @new.use_persistent_cache?
586
652
  end
587
653
  end
654
+
655
+ class MailNotifier
656
+ def initialize(success, elapsed_time, options)
657
+ @success = success
658
+ @elapsed_time = elapsed_time
659
+ @options = options
660
+ @path = @options[:path] || "results"
661
+ end
662
+
663
+ def notify
664
+ return unless @options[:mail_to]
665
+
666
+ output = StringIO.new
667
+ formetter = FormatRegressionTestLogs.new(output: output)
668
+ formetter.run([@path])
669
+ formatted_log = output.string
670
+
671
+ if @success
672
+ subject = @options[:mail_subject_on_success]
673
+ else
674
+ subject = @options[:mail_subject_on_failure]
675
+ end
676
+ content = format_elapsed_time
677
+ content << "Report:\n"
678
+ content << formatted_log
679
+ send_mail(subject, content)
680
+ end
681
+
682
+ private
683
+ def format_elapsed_time
684
+ elapsed_seconds = @elapsed_time % 60
685
+ elapsed_minutes = @elapsed_time / 60 % 60
686
+ elapsed_hours = @elapsed_time / 60 / 60 % 24
687
+ elapsed_days = @elapsed_time / 60 / 60 / 24
688
+ "Elapsed: %ddays %02d:%02d:%02d\n" % [
689
+ elapsed_days,
690
+ elapsed_hours,
691
+ elapsed_minutes,
692
+ elapsed_seconds
693
+ ]
694
+ end
695
+
696
+ def send_mail(subject, content)
697
+ header = <<-HEADER
698
+ MIME-Version: 1.0
699
+ X-Mailer: groonga-query-log test reporter #{VERSION};
700
+ https://github.com/groonga/groonga-query-log
701
+ Content-Type: text/plain; charset=utf-8
702
+ Content-Transfer-Encoding: 8bit
703
+ From: #{@options[:mail_from]}
704
+ To: #{@options[:mail_to]}
705
+ Subject: #{subject}
706
+ Date: #{Time.now.rfc2822}
707
+ HEADER
708
+
709
+ mail = <<-MAIL.gsub(/\r?\n/, "\r\n")
710
+ #{header}
711
+ #{content}
712
+ MAIL
713
+ smtp = Net::SMTP.new(@options[:smtp_server], @options[:smtp_port])
714
+ smtp.enable_starttls if @options[:smtp_starttls]
715
+ smtp.start(@options[:smtp_server],
716
+ @options[:smtp_auth_user],
717
+ @options[:smtp_auth_password]) do
718
+ smtp.send_message(mail, @options[:mail_from], @options[:mail_to])
719
+ end
720
+ end
721
+ end
588
722
  end
589
723
  end
590
724
  end
@@ -116,18 +116,25 @@ module GroongaQueryLog
116
116
  statistic.start(time_stamp, rest)
117
117
  @parsing_statistics[context_id] = statistic
118
118
  when ":"
119
- return unless /\A(\d+) (.+)\((\d+)\)(\[.+\])?(?:: (.*))?/ =~ rest
120
- elapsed = $1
121
- name = $2
122
- name += $4 if $4
123
- n_records = $3.to_i
124
- extra = $5
119
+ return unless /\A
120
+ (?<elapsed>\d+)
121
+ \
122
+ (?<raw_message>
123
+ (?<name>[a-zA-Z._-]+)
124
+ (?<sub_name_before>\[.+?\](?:[a-zA-Z._-]*))?
125
+ (?:\((?<n_records>\d+)\))?
126
+ (?<sub_name_after>\[.+?\])?
127
+ (?::\ (?<extra>.*))?
128
+ )
129
+ /x =~ rest
125
130
  statistic = @parsing_statistics[context_id]
126
131
  return if statistic.nil?
127
- statistic.add_operation(:name => name,
132
+ full_name = "#{name}#{sub_name_before}#{sub_name_after}"
133
+ statistic.add_operation(:name => full_name,
128
134
  :elapsed => elapsed.to_i,
129
- :n_records => n_records,
130
- :extra => extra)
135
+ :n_records => n_records.to_i,
136
+ :extra => extra,
137
+ :raw_message => raw_message)
131
138
  when "<"
132
139
  return unless /\A(\d+) rc=(-?\d+)/ =~ rest
133
140
  elapsed = $1
@@ -85,6 +85,7 @@ module GroongaQueryLog
85
85
  :n_records => operation[:n_records],
86
86
  :extra => operation[:extra],
87
87
  :slow? => slow_operation?(relative_elapsed_in_seconds),
88
+ :raw_message => operation[:raw_message],
88
89
  }
89
90
  yield parsed_operation
90
91
  end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2018 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2012-2019 Kouhei Sutou <kou@clear-code.com>
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -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.4.0"
18
+ VERSION = "1.4.1"
19
19
  end
@@ -0,0 +1,128 @@
1
+ # Copyright (C) 2019 Kentaro Hayashi <hayashi@clear-code.com>
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ require "groonga-query-log/command/run-regression-test"
18
+
19
+ class RunRegressionTestCommandTest < Test::Unit::TestCase
20
+ include Helper::Path
21
+
22
+ def fixture_path(*components)
23
+ super("regression-test-logs", *components)
24
+ end
25
+
26
+ class SMTPServer
27
+ def initialize
28
+ @socket = TCPServer.open(host, port)
29
+ end
30
+ end
31
+
32
+ sub_test_case("MailNotifier") do
33
+ MailNotifier = GroongaQueryLog::Command::RunRegressionTest::MailNotifier
34
+
35
+ def setup
36
+ @smtp_host = "127.0.0.1"
37
+ @smtp_port = 20025
38
+ @requests = []
39
+ @now = "Tue, 26 Mar 2019 16:39:46 +0900"
40
+ @server = TCPServer.open(@smtp_host, @smtp_port)
41
+ @thread = Thread.new do
42
+ client = @server.accept
43
+ client.print("220 localhost SMTP server\r\n")
44
+ client.each_line do |line|
45
+ @requests << line
46
+ case line.chomp
47
+ when /\AEHLO /
48
+ client.print("250 AUTH\r\n")
49
+ when /\AMAIL FROM:/
50
+ client.print("250 2.1.0 Ok\r\n")
51
+ when /\ARCPT TO:/
52
+ client.print("250 2.1.0 Ok\r\n")
53
+ when "DATA"
54
+ client.print("354 End data with <CR><LF>.<CR><LF>\r\n")
55
+ when "."
56
+ client.print("250 2.0.0 Ok\r\n")
57
+ when "QUIT"
58
+ client.print("221 2.0.0 Bye\r\n")
59
+ client.close
60
+ break
61
+ end
62
+ end
63
+ end
64
+ end
65
+
66
+ def teardown
67
+ @server.close
68
+ @thread.kill
69
+ end
70
+
71
+ def normalized_request
72
+ @requests
73
+ .join("")
74
+ .gsub(/^Date: .*\r\n/,
75
+ "Date: #{@now}\r\n")
76
+ end
77
+
78
+ def test_success
79
+ options = {
80
+ :smtp_server => @smtp_host,
81
+ :smtp_port => @smtp_port,
82
+ :mail_from => "groonga-query-log@example.com",
83
+ :mail_to => "noreply@example.com",
84
+ :mail_subject_on_success => "Success",
85
+ :mail_subject_on_failure => "Failure",
86
+ :path => fixture_path("url-format.log"),
87
+ }
88
+ notifier = MailNotifier.new(true, 3000, options)
89
+ notifier.notify
90
+ assert_equal(<<-REQUEST.gsub(/\n/, "\r\n").b, normalized_request)
91
+ EHLO 127.0.0.1
92
+ MAIL FROM:<#{options[:mail_from]}>
93
+ RCPT TO:<#{options[:mail_to]}>
94
+ DATA
95
+ MIME-Version: 1.0
96
+ X-Mailer: groonga-query-log test reporter #{GroongaQueryLog::VERSION};
97
+ https://github.com/groonga/groonga-query-log
98
+ Content-Type: text/plain; charset=utf-8
99
+ Content-Transfer-Encoding: 8bit
100
+ From: #{options[:mail_from]}
101
+ To: #{options[:mail_to]}
102
+ Subject: Success
103
+ Date: #{@now}
104
+
105
+ Elapsed: 0days 00:50:00
106
+ Report:
107
+ Command:
108
+ /d/select?table=Logs&match_columns=message&query=%E7%84%BC%E8%82%89
109
+ Name: select
110
+ Arguments:
111
+ match_columns: message
112
+ query: 焼肉
113
+ table: Logs
114
+ --- old
115
+ +++ new
116
+ @@ -1,4 +1,4 @@
117
+ [[[2],
118
+ [["_id", "UInt32"], ["message", "Text"]],
119
+ [1, "log message1: 焼肉"],
120
+ - [2, "log message2: 焼肉"]]]
121
+ + [3, "log message3: 焼肉"]]]
122
+
123
+ .
124
+ QUIT
125
+ REQUEST
126
+ end
127
+ end
128
+ end
@@ -0,0 +1,165 @@
1
+ 2017-04-24 11:06:45.783903|n| grn_init: <7.0.1-105-gf940037>
2
+ 2017-04-24 11:06:45.783995|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
3
+ 2017-04-24 11:06:45.785696|n| DDL:256:table_create Entries
4
+ 2017-04-24 11:06:45.832240|n| spec:256:update:Entries:48(table:hash_key):0
5
+ 2017-04-24 11:06:45.832566|n| DDL:257:column_create Entries description
6
+ 2017-04-24 11:06:45.882379|n| spec:257:update:Entries.description:65(column:var_size):15(Text)
7
+ 2017-04-24 11:06:45.902188|n| grn_fin (0)
8
+ 2017-04-24 11:06:45.911851|n| grn_init: <7.0.1-105-gf940037>
9
+ 2017-04-24 11:06:45.911981|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
10
+ 2017-04-24 11:06:45.927281|n| grn_fin (0)
11
+ 2017-04-24 11:06:45.938921|n| grn_init: <7.0.1-105-gf940037>
12
+ 2017-04-24 11:06:45.939085|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
13
+ 2017-04-24 11:06:45.943080|n| DDL:258:table_create Bigram
14
+ 2017-04-24 11:06:45.990956|n| spec:258:update:Bigram:49(table:pat_key):0
15
+ 2017-04-24 11:06:45.991456|n| DDL:259:column_create Bigram Entries_description
16
+ 2017-04-24 11:06:46.084367|n| spec:259:update:Bigram.Entries_description:72(column:index):256(Entries)
17
+ 2017-04-24 11:06:46.099864|n| DDL:259:set_source Bigram.Entries_description Entries.description
18
+ 2017-04-24 11:06:46.099925|n| spec:257:update:Entries.description:65(column:var_size):15(Text)
19
+ 2017-04-24 11:06:46.104701|n| spec:259:update:Bigram.Entries_description:72(column:index):256(Entries)
20
+ 2017-04-24 11:06:46.113406|n| grn_fin (0)
21
+ 2017-04-24 11:06:46.117714|n| grn_init: <7.0.1-105-gf940037>
22
+ 2017-04-24 11:06:46.117765|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
23
+ 2017-04-24 11:06:46.117899|n| RLIMIT_NOFILE(4096,4096)
24
+ 2017-04-24 11:06:47.117263|n| thread start (0/1)
25
+ 2017-04-24 11:06:47.495184|n| thread end (0/0)
26
+ 2017-04-24 11:06:47.498054|n| grn_fin (0)
27
+ 2017-04-24 11:07:45.262160|n| grn_init: <7.0.1-105-gf940037>
28
+ 2017-04-24 11:07:45.262192|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
29
+ 2017-04-24 11:07:45.262282|n| RLIMIT_NOFILE(4096,4096)
30
+ 2017-04-24 11:07:46.261844|n| thread start (0/1)
31
+ 2017-04-24 11:07:46.580606|n| thread end (0/0)
32
+ 2017-04-24 11:07:46.583733|n| grn_fin (0)
33
+ 2017-04-24 11:07:46.586691|n| grn_init: <7.0.1-105-gf940037>
34
+ 2017-04-24 11:07:46.586724|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
35
+ 2017-04-24 11:07:46.586809|n| RLIMIT_NOFILE(4096,4096)
36
+ 2017-04-24 11:07:47.585962|n| thread start (0/1)
37
+ 2017-04-24 11:07:48.028639|n| thread end (0/0)
38
+ 2017-04-24 11:07:48.030048|n| grn_fin (0)
39
+ 2017-04-24 11:07:48.034362|n| grn_init: <7.0.1-105-gf940037>
40
+ 2017-04-24 11:07:48.034410|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
41
+ 2017-04-24 11:07:48.034549|n| RLIMIT_NOFILE(4096,4096)
42
+ 2017-04-24 11:07:49.032453|n| thread start (0/1)
43
+ 2017-04-24 11:07:49.195891|n| thread end (0/0)
44
+ 2017-04-24 11:07:49.196755|n| grn_fin (0)
45
+ 2017-04-24 11:10:47.018307|n| grn_init: <7.0.1-105-gf940037>
46
+ 2017-04-24 11:10:47.018349|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
47
+ 2017-04-24 11:10:47.018437|n| RLIMIT_NOFILE(4096,4096)
48
+ 2017-04-24 11:10:48.017869|n| thread start (0/1)
49
+ 2017-04-24 11:10:48.313167|n| thread end (0/0)
50
+ 2017-04-24 11:10:48.314042|n| grn_fin (0)
51
+ 2017-04-24 11:10:48.316882|n| grn_init: <7.0.1-105-gf940037>
52
+ 2017-04-24 11:10:48.316926|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
53
+ 2017-04-24 11:10:48.317007|n| RLIMIT_NOFILE(4096,4096)
54
+ 2017-04-24 11:10:49.315935|n| thread start (0/1)
55
+ 2017-04-24 11:10:49.698905|n| thread end (0/0)
56
+ 2017-04-24 11:10:49.700064|n| grn_fin (0)
57
+ 2017-04-24 11:10:49.705284|n| grn_init: <7.0.1-105-gf940037>
58
+ 2017-04-24 11:10:49.705412|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
59
+ 2017-04-24 11:10:49.705578|n| RLIMIT_NOFILE(4096,4096)
60
+ 2017-04-24 11:10:50.702205|n| thread start (0/1)
61
+ 2017-04-24 11:10:50.858002|n| thread end (0/0)
62
+ 2017-04-24 11:10:50.858862|n| grn_fin (0)
63
+ 2017-04-24 11:11:12.606175|n| grn_init: <7.0.1-105-gf940037>
64
+ 2017-04-24 11:11:12.606214|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
65
+ 2017-04-24 11:11:12.606307|n| RLIMIT_NOFILE(4096,4096)
66
+ 2017-04-24 11:11:13.605834|n| thread start (0/1)
67
+ 2017-04-24 11:11:13.842406|n| thread end (0/0)
68
+ 2017-04-24 11:11:13.843288|n| grn_fin (0)
69
+ 2017-04-24 11:11:13.846133|n| grn_init: <7.0.1-105-gf940037>
70
+ 2017-04-24 11:11:13.846164|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
71
+ 2017-04-24 11:11:13.846254|n| RLIMIT_NOFILE(4096,4096)
72
+ 2017-04-24 11:11:14.845410|n| thread start (0/1)
73
+ 2017-04-24 11:11:15.127688|n| thread end (0/0)
74
+ 2017-04-24 11:11:15.128568|n| grn_fin (0)
75
+ 2017-04-24 11:11:15.131325|n| grn_init: <7.0.1-105-gf940037>
76
+ 2017-04-24 11:11:15.131357|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
77
+ 2017-04-24 11:11:15.131440|n| RLIMIT_NOFILE(4096,4096)
78
+ 2017-04-24 11:11:16.130617|n| thread start (0/1)
79
+ 2017-04-24 11:11:42.306188|n| grn_init: <7.0.1-105-gf940037>
80
+ 2017-04-24 11:11:42.306219|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
81
+ 2017-04-24 11:11:42.306306|n| RLIMIT_NOFILE(4096,4096)
82
+ 2017-04-24 11:11:43.308553|n| thread start (0/1)
83
+ 2017-04-24 11:11:43.580788|n| thread end (0/0)
84
+ 2017-04-24 11:11:43.581685|n| grn_fin (0)
85
+ 2017-04-24 11:11:43.584541|n| grn_init: <7.0.1-105-gf940037>
86
+ 2017-04-24 11:11:43.584576|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
87
+ 2017-04-24 11:11:43.584662|n| RLIMIT_NOFILE(4096,4096)
88
+ 2017-04-24 11:11:44.583985|n| thread start (0/1)
89
+ 2017-04-24 11:11:44.874262|n| thread end (0/0)
90
+ 2017-04-24 11:11:44.875167|n| grn_fin (0)
91
+ 2017-04-24 11:11:44.877971|n| grn_init: <7.0.1-105-gf940037>
92
+ 2017-04-24 11:11:44.878014|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
93
+ 2017-04-24 11:11:44.878098|n| RLIMIT_NOFILE(4096,4096)
94
+ 2017-04-24 11:11:45.877207|n| thread start (0/1)
95
+ 2017-04-24 11:11:46.066477|n| thread end (0/0)
96
+ 2017-04-24 11:11:46.067611|n| grn_fin (0)
97
+ 2017-04-24 11:12:06.890149|n| grn_init: <7.0.1-105-gf940037>
98
+ 2017-04-24 11:12:06.890181|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
99
+ 2017-04-24 11:12:06.890263|n| RLIMIT_NOFILE(4096,4096)
100
+ 2017-04-24 11:12:07.889979|n| thread start (0/1)
101
+ 2017-04-24 11:12:08.166979|n| thread end (0/0)
102
+ 2017-04-24 11:12:08.167884|n| grn_fin (0)
103
+ 2017-04-24 11:12:08.170752|n| grn_init: <7.0.1-105-gf940037>
104
+ 2017-04-24 11:12:08.170794|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
105
+ 2017-04-24 11:12:08.170877|n| RLIMIT_NOFILE(4096,4096)
106
+ 2017-04-24 11:12:09.170034|n| thread start (0/1)
107
+ 2017-04-24 11:12:09.466889|n| thread end (0/0)
108
+ 2017-04-24 11:12:09.467813|n| grn_fin (0)
109
+ 2017-04-24 11:12:09.470729|n| grn_init: <7.0.1-105-gf940037>
110
+ 2017-04-24 11:12:09.470761|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
111
+ 2017-04-24 11:12:09.470845|n| RLIMIT_NOFILE(4096,4096)
112
+ 2017-04-24 11:12:10.469841|n| thread start (0/1)
113
+ 2017-04-24 11:12:10.568799|n| thread end (0/0)
114
+ 2017-04-24 11:12:10.569881|n| grn_fin (0)
115
+ 2017-04-24 11:12:21.466214|n| grn_init: <7.0.1-105-gf940037>
116
+ 2017-04-24 11:12:21.466249|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
117
+ 2017-04-24 11:12:21.466332|n| RLIMIT_NOFILE(4096,4096)
118
+ 2017-04-24 11:12:22.466174|n| thread start (0/1)
119
+ 2017-04-24 11:12:22.724694|n| thread end (0/0)
120
+ 2017-04-24 11:12:22.725556|n| grn_fin (0)
121
+ 2017-04-24 11:12:22.728489|n| grn_init: <7.0.1-105-gf940037>
122
+ 2017-04-24 11:12:22.728520|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
123
+ 2017-04-24 11:12:22.728608|n| RLIMIT_NOFILE(4096,4096)
124
+ 2017-04-24 11:12:23.727545|n| thread start (0/1)
125
+ 2017-04-24 11:12:23.997429|n| thread end (0/0)
126
+ 2017-04-24 11:12:23.998293|n| grn_fin (0)
127
+ 2017-04-24 11:12:24.001106|n| grn_init: <7.0.1-105-gf940037>
128
+ 2017-04-24 11:12:24.001138|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
129
+ 2017-04-24 11:12:24.001219|n| RLIMIT_NOFILE(4096,4096)
130
+ 2017-04-24 11:12:25.000343|n| thread start (0/1)
131
+ 2017-04-24 11:12:25.201017|n| thread end (0/0)
132
+ 2017-04-24 11:12:25.202162|n| grn_fin (0)
133
+ 2017-04-24 11:19:59.316027|n| grn_init: <7.0.1-105-gf940037>
134
+ 2017-04-24 11:19:59.316064|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
135
+ 2017-04-24 11:19:59.316148|n| RLIMIT_NOFILE(4096,4096)
136
+ 2017-04-24 11:20:00.315342|n| thread start (0/1)
137
+ 2017-04-24 11:20:00.543339|n| thread end (0/0)
138
+ 2017-04-24 11:20:00.544322|n| grn_fin (0)
139
+ 2017-04-24 11:20:00.547319|n| grn_init: <7.0.1-105-gf940037>
140
+ 2017-04-24 11:20:00.547355|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
141
+ 2017-04-24 11:20:00.547440|n| RLIMIT_NOFILE(4096,4096)
142
+ 2017-04-24 11:20:01.545653|n| thread start (0/1)
143
+ 2017-04-24 11:20:01.731747|n| thread end (0/0)
144
+ 2017-04-24 11:20:01.732644|n| grn_fin (0)
145
+ 2017-04-24 11:20:01.735519|n| grn_init: <7.0.1-105-gf940037>
146
+ 2017-04-24 11:20:01.735558|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
147
+ 2017-04-24 11:20:01.735643|n| RLIMIT_NOFILE(4096,4096)
148
+ 2017-04-24 11:20:02.734551|n| thread start (0/1)
149
+ 2017-04-24 11:20:02.951152|n| thread end (0/0)
150
+ 2017-04-24 11:20:02.952691|n| grn_fin (0)
151
+ 2017-04-24 11:20:09.446073|n| grn_init: <7.0.1-105-gf940037>
152
+ 2017-04-24 11:20:09.446115|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
153
+ 2017-04-24 11:20:09.446201|n| RLIMIT_NOFILE(4096,4096)
154
+ 2017-04-24 11:20:10.448377|n| thread start (0/1)
155
+ 2017-04-24 11:20:10.789136|n| thread end (0/0)
156
+ 2017-04-24 11:20:10.792153|n| grn_fin (0)
157
+ 2017-04-24 13:01:10.344434|e| system call error: Interrupted system call: epoll_wait
158
+ 2017-04-24 13:01:10.344720|e| /tmp/local/lib/libgroonga.so.0(grn_com_event_poll+0x600) [0x7fe1890695cf]
159
+ 2017-04-24 13:01:10.344749|e| /tmp/local/bin/groonga(+0x8db6) [0x564c572ecdb6]
160
+ 2017-04-24 13:01:10.344763|e| /tmp/local/bin/groonga(+0x9e7c) [0x564c572ede7c]
161
+ 2017-04-24 13:01:10.344776|e| /tmp/local/bin/groonga(+0xa035) [0x564c572ee035]
162
+ 2017-04-24 13:01:10.344788|e| /tmp/local/bin/groonga(+0x132b7) [0x564c572f72b7]
163
+ 2017-04-24 13:01:10.344800|e| /tmp/local/bin/groonga(+0x18088) [0x564c572fc088]
164
+ 2017-04-24 13:01:10.344813|e| /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7fe1872bf2b1]
165
+ 2017-04-24 13:01:10.344825|e| /tmp/local/bin/groonga(+0x4e2a) [0x564c572e8e2a]
@@ -0,0 +1,79 @@
1
+ 2017-04-24 11:06:44.872561|n| grn_init: <7.0.1-105-gf940037>
2
+ 2017-04-24 11:06:44.872642|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
3
+ 2017-04-24 11:06:44.873832|n| DDL:256:table_create Entries
4
+ 2017-04-24 11:06:44.929837|n| spec:256:update:Entries:48(table:hash_key):0
5
+ 2017-04-24 11:06:44.930157|n| DDL:257:column_create Entries description
6
+ 2017-04-24 11:06:44.979980|n| spec:257:update:Entries.description:65(column:var_size):15(Text)
7
+ 2017-04-24 11:06:45.005342|n| grn_fin (0)
8
+ 2017-04-24 11:06:45.013826|n| grn_init: <7.0.1-105-gf940037>
9
+ 2017-04-24 11:06:45.013966|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
10
+ 2017-04-24 11:06:45.030106|n| grn_fin (0)
11
+ 2017-04-24 11:06:45.038715|n| grn_init: <7.0.1-105-gf940037>
12
+ 2017-04-24 11:06:45.038857|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
13
+ 2017-04-24 11:06:45.042555|n| DDL:258:table_create Bigram
14
+ 2017-04-24 11:06:45.088700|n| spec:258:update:Bigram:49(table:pat_key):0
15
+ 2017-04-24 11:06:45.089198|n| DDL:259:column_create Bigram Entries_description
16
+ 2017-04-24 11:06:45.189880|n| spec:259:update:Bigram.Entries_description:72(column:index):256(Entries)
17
+ 2017-04-24 11:06:45.210684|n| DDL:259:set_source Bigram.Entries_description Entries.description
18
+ 2017-04-24 11:06:45.210758|n| spec:257:update:Entries.description:65(column:var_size):15(Text)
19
+ 2017-04-24 11:06:45.215438|n| spec:259:update:Bigram.Entries_description:72(column:index):256(Entries)
20
+ 2017-04-24 11:06:45.223494|n| grn_fin (0)
21
+ 2017-04-24 11:06:46.117605|n| grn_init: <7.0.1-105-gf940037>
22
+ 2017-04-24 11:06:46.117680|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
23
+ 2017-04-24 11:06:46.117807|n| RLIMIT_NOFILE(4096,4096)
24
+ 2017-04-24 11:06:47.117914|n| thread start (0/1)
25
+ 2017-04-24 11:06:47.495106|n| thread end (0/0)
26
+ 2017-04-24 11:06:47.498049|n| grn_fin (0)
27
+ 2017-04-24 11:07:45.260497|n| grn_init: <7.0.1-105-gf940037>
28
+ 2017-04-24 11:07:45.260555|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
29
+ 2017-04-24 11:07:45.260635|n| RLIMIT_NOFILE(4096,4096)
30
+ 2017-04-24 11:07:46.262231|n| thread start (0/1)
31
+ 2017-04-24 11:07:49.196124|n| thread end (0/0)
32
+ 2017-04-24 11:07:49.199045|n| grn_fin (0)
33
+ 2017-04-24 11:10:47.015640|n| grn_init: <7.0.1-105-gf940037>
34
+ 2017-04-24 11:10:47.015723|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
35
+ 2017-04-24 11:10:47.015811|n| RLIMIT_NOFILE(4096,4096)
36
+ 2017-04-24 11:10:48.018144|n| thread start (0/1)
37
+ 2017-04-24 11:10:50.858117|n| thread end (0/0)
38
+ 2017-04-24 11:10:50.861057|n| grn_fin (0)
39
+ 2017-04-24 11:11:12.604406|n| grn_init: <7.0.1-105-gf940037>
40
+ 2017-04-24 11:11:12.604464|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
41
+ 2017-04-24 11:11:12.604542|n| RLIMIT_NOFILE(4096,4096)
42
+ 2017-04-24 11:11:13.606243|n| thread start (0/1)
43
+ 2017-04-24 11:11:42.304545|n| grn_init: <7.0.1-105-gf940037>
44
+ 2017-04-24 11:11:42.304594|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
45
+ 2017-04-24 11:11:42.304674|n| RLIMIT_NOFILE(4096,4096)
46
+ 2017-04-24 11:11:43.305717|n| thread start (0/1)
47
+ 2017-04-24 11:11:46.066584|n| thread end (0/0)
48
+ 2017-04-24 11:11:46.070501|n| grn_fin (0)
49
+ 2017-04-24 11:12:06.886810|n| grn_init: <7.0.1-105-gf940037>
50
+ 2017-04-24 11:12:06.886857|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
51
+ 2017-04-24 11:12:06.886933|n| RLIMIT_NOFILE(4096,4096)
52
+ 2017-04-24 11:12:06.888501|n| thread start (0/1)
53
+ 2017-04-24 11:12:10.568618|n| thread end (0/0)
54
+ 2017-04-24 11:12:10.571785|n| grn_fin (0)
55
+ 2017-04-24 11:12:21.462928|n| grn_init: <7.0.1-105-gf940037>
56
+ 2017-04-24 11:12:21.462974|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
57
+ 2017-04-24 11:12:21.463054|n| RLIMIT_NOFILE(4096,4096)
58
+ 2017-04-24 11:12:21.467367|n| thread start (0/1)
59
+ 2017-04-24 11:12:25.201154|n| thread end (0/0)
60
+ 2017-04-24 11:12:25.205066|n| grn_fin (0)
61
+ 2017-04-24 11:19:59.312302|n| grn_init: <7.0.1-105-gf940037>
62
+ 2017-04-24 11:19:59.312348|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
63
+ 2017-04-24 11:19:59.312424|n| RLIMIT_NOFILE(4096,4096)
64
+ 2017-04-24 11:19:59.314172|n| thread start (0/1)
65
+ 2017-04-24 11:20:02.950972|n| thread end (0/0)
66
+ 2017-04-24 11:20:02.956336|n| grn_fin (0)
67
+ 2017-04-24 11:20:09.443167|n| grn_init: <7.0.1-105-gf940037>
68
+ 2017-04-24 11:20:09.443214|n| vm.overcommit_memory kernel parameter should be 1: <0>: See INFO level log to resolve this
69
+ 2017-04-24 11:20:09.443297|n| RLIMIT_NOFILE(4096,4096)
70
+ 2017-04-24 11:20:10.445853|n| thread start (0/1)
71
+ 2017-04-24 11:20:10.789276|n| thread end (0/0)
72
+ 2017-04-24 11:20:10.792230|n| grn_fin (0)
73
+ 2017-04-24 13:01:10.343392|e| system call error: Interrupted system call: epoll_wait
74
+ 2017-04-24 13:01:10.343699|e| /tmp/local/lib/libgroonga.so.0(grn_com_event_poll+0x600) [0x7f8575c9c5cf]
75
+ 2017-04-24 13:01:10.343722|e| groonga(+0xc58b) [0x56012441658b]
76
+ 2017-04-24 13:01:10.343737|e| groonga(+0xde2e) [0x560124417e2e]
77
+ 2017-04-24 13:01:10.343748|e| groonga(+0x54e0) [0x56012440f4e0]
78
+ 2017-04-24 13:01:10.343759|e| /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f857478d2b1]
79
+ 2017-04-24 13:01:10.343771|e| groonga(+0x5e6a) [0x56012440fe6a]
data/test/test-parser.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2011-2017 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2011-2019 Kouhei Sutou <kou@clear-code.com>
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -267,6 +267,67 @@ class ParserTest < Test::Unit::TestCase
267
267
  end
268
268
  end
269
269
 
270
+ class NameFieldTest < self
271
+ def test_io_flush
272
+ statistics = parse(<<-LOG)
273
+ 2019-05-09 18:44:25.983672|0x7fff5e4a3060|>io_flush Lexicon.sources_value --output_type json
274
+ 2019-05-09 18:44:25.989502|0x7fff5e4a3060|:000000005833721 flush[Lexicon.sources_value]
275
+ 2019-05-09 18:44:25.989519|0x7fff5e4a3060|:000000005848066 flush[(anonymous:table:dat_key)]
276
+ 2019-05-09 18:44:25.990491|0x7fff5e4a3060|:000000006820471 flush[(anonymous:column:var_size)]
277
+ 2019-05-09 18:44:25.990496|0x7fff5e4a3060|:000000006824538 flush[(anonymous:table:hash_key)]
278
+ 2019-05-09 18:44:25.991425|0x7fff5e4a3060|:000000007753922 flush[(anonymous:column:var_size)]
279
+ 2019-05-09 18:44:25.991427|0x7fff5e4a3060|:000000007755618 flush[(DB)]
280
+ 2019-05-09 18:44:25.991431|0x7fff5e4a3060|<000000007759904 rc=0
281
+ LOG
282
+ operations = statistics.first.operations.collect do |operation|
283
+ [operation[:name], operation[:raw_message]]
284
+ end
285
+ expected = [
286
+ ["flush[Lexicon.sources_value]",
287
+ "flush[Lexicon.sources_value]"],
288
+ ["flush[(anonymous:table:dat_key)]",
289
+ "flush[(anonymous:table:dat_key)]"],
290
+ ["flush[(anonymous:column:var_size)]",
291
+ "flush[(anonymous:column:var_size)]"],
292
+ ["flush[(anonymous:table:hash_key)]",
293
+ "flush[(anonymous:table:hash_key)]"],
294
+ ["flush[(anonymous:column:var_size)]",
295
+ "flush[(anonymous:column:var_size)]"],
296
+ ["flush[(DB)]",
297
+ "flush[(DB)]"],
298
+ ]
299
+ assert_equal(expected, operations)
300
+ end
301
+
302
+ def test_labeled_drilldown
303
+ statistics = parse(<<-LOG)
304
+ 2019-05-09 19:00:12.085062|0x7ffdf54d2180|>select Memos --limit 0 --output_columns _id --drilldowns[tags].keys tags --drilldowns[tags].adjuster 'categories @ \"full-text-search\" * 2 + categories @ \"mysql\"' --drilldowns[tags].output_columns _key,_nsubrecs,_score --output_type json
305
+ 2019-05-09 19:00:12.085165|0x7ffdf54d2180|:000000000105785 select(3)
306
+ 2019-05-09 19:00:12.085664|0x7ffdf54d2180|:000000000605514 drilldowns[tags].adjust(3)
307
+ 2019-05-09 19:00:12.085672|0x7ffdf54d2180|:000000000611117 drilldowns[tags](3)
308
+ 2019-05-09 19:00:12.085696|0x7ffdf54d2180|:000000000635356 output(0)
309
+ 2019-05-09 19:00:12.085722|0x7ffdf54d2180|:000000000661819 output.drilldowns[tags](3)
310
+ 2019-05-09 19:00:12.085768|0x7ffdf54d2180|<000000000707717 rc=0
311
+ LOG
312
+ operations = statistics.first.operations.collect do |operation|
313
+ [operation[:name], operation[:raw_message]]
314
+ end
315
+ expected = [
316
+ ["select",
317
+ "select(3)"],
318
+ ["drilldowns[tags].adjust",
319
+ "drilldowns[tags].adjust(3)"],
320
+ ["drilldowns[tags]",
321
+ "drilldowns[tags](3)"],
322
+ ["output",
323
+ "output(0)"],
324
+ ["output.drilldowns[tags]",
325
+ "output.drilldowns[tags](3)"],
326
+ ]
327
+ assert_equal(expected, operations)
328
+ end
329
+ end
330
+
270
331
  class ExtraFieldTest < self
271
332
  def test_load
272
333
  statistics = parse(<<-LOG)
@@ -275,10 +336,15 @@ class ParserTest < Test::Unit::TestCase
275
336
  2017-12-11 09:37:04.517999|0x7fffc430dff0|<000000001061996 rc=-22
276
337
  LOG
277
338
  operations = statistics.first.operations.collect do |operation|
278
- [operation[:name], operation[:n_records], operation[:extra]]
339
+ [
340
+ operation[:name],
341
+ operation[:n_records],
342
+ operation[:extra],
343
+ operation[:raw_message],
344
+ ]
279
345
  end
280
346
  expected = [
281
- ["load", 3, "[1][2][3]"],
347
+ ["load", 3, "[1][2][3]", "load(3): [1][2][3]"],
282
348
  ]
283
349
  assert_equal(expected, operations)
284
350
  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.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-13 00:00:00.000000000 Z
11
+ date: 2019-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: groonga-command-parser
@@ -154,17 +154,17 @@ description: ''
154
154
  email:
155
155
  - kou@clear-code.com
156
156
  executables:
157
- - groonga-query-log-format-regression-test-logs
158
- - groonga-query-log-run-regression-test
159
- - groonga-query-log-check-crash
160
- - groonga-query-log-replay
161
- - groonga-query-log-check-command-version-compatibility
162
- - groonga-query-log-verify-server
163
- - groonga-query-log-show-running-queries
164
157
  - groonga-query-log-analyze
158
+ - groonga-query-log-analyze-load
159
+ - groonga-query-log-check-crash
165
160
  - groonga-query-log-extract
161
+ - groonga-query-log-check-command-version-compatibility
162
+ - groonga-query-log-replay
163
+ - groonga-query-log-format-regression-test-logs
166
164
  - groonga-query-log-detect-memory-leak
167
- - groonga-query-log-analyze-load
165
+ - groonga-query-log-show-running-queries
166
+ - groonga-query-log-verify-server
167
+ - groonga-query-log-run-regression-test
168
168
  extensions: []
169
169
  extra_rdoc_files: []
170
170
  files:
@@ -232,6 +232,7 @@ files:
232
232
  - test/command/test-analyzer.rb
233
233
  - test/command/test-extract.rb
234
234
  - test/command/test-format-regression-test-logs.rb
235
+ - test/command/test-run-regression-test.rb
235
236
  - test/fixtures/multi.expected
236
237
  - test/fixtures/n_entries.expected
237
238
  - test/fixtures/no-report-summary.expected
@@ -249,8 +250,29 @@ files:
249
250
  - test/fixtures/reporter/json-stream.expected
250
251
  - test/fixtures/reporter/json.expected
251
252
  - test/fixtures/run-regression-test/data/data.grn
253
+ - test/fixtures/run-regression-test/db.new/db
254
+ - test/fixtures/run-regression-test/db.new/db.0000000
255
+ - test/fixtures/run-regression-test/db.new/db.0000100
256
+ - test/fixtures/run-regression-test/db.new/db.0000101
257
+ - test/fixtures/run-regression-test/db.new/db.0000102
258
+ - test/fixtures/run-regression-test/db.new/db.0000103
259
+ - test/fixtures/run-regression-test/db.new/db.0000103.c
260
+ - test/fixtures/run-regression-test/db.new/db.001
261
+ - test/fixtures/run-regression-test/db.new/db.conf
262
+ - test/fixtures/run-regression-test/db.new/groonga.log
263
+ - test/fixtures/run-regression-test/db.old/db
264
+ - test/fixtures/run-regression-test/db.old/db.0000000
265
+ - test/fixtures/run-regression-test/db.old/db.0000100
266
+ - test/fixtures/run-regression-test/db.old/db.0000101
267
+ - test/fixtures/run-regression-test/db.old/db.0000102
268
+ - test/fixtures/run-regression-test/db.old/db.0000103
269
+ - test/fixtures/run-regression-test/db.old/db.0000103.c
270
+ - test/fixtures/run-regression-test/db.old/db.001
271
+ - test/fixtures/run-regression-test/db.old/db.conf
272
+ - test/fixtures/run-regression-test/db.old/groonga.log
252
273
  - test/fixtures/run-regression-test/indexes/indexes.grn
253
274
  - test/fixtures/run-regression-test/query-logs/query.log
275
+ - test/fixtures/run-regression-test/results/query.log
254
276
  - test/fixtures/run-regression-test/schema/schema.grn
255
277
  - test/fixtures/target-commands.expected
256
278
  - test/fixtures/target-tables.expected
@@ -280,7 +302,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
280
302
  - !ruby/object:Gem::Version
281
303
  version: '0'
282
304
  requirements: []
283
- rubygems_version: 3.0.2
305
+ rubyforge_project:
306
+ rubygems_version: 2.7.6.2
284
307
  signing_key:
285
308
  specification_version: 4
286
309
  summary: Groonga-query-log is a collection of library and tools to process [Groonga](http://groonga.org/)'s
@@ -288,35 +311,57 @@ summary: Groonga-query-log is a collection of library and tools to process [Groo
288
311
  as a library. You can analyze your Groonga's queries and test with your Groonga's
289
312
  query log by using groonga-query-log as a tool.
290
313
  test_files:
291
- - test/fixtures/reporter/console.expected
314
+ - test/test-parser.rb
315
+ - test/helper.rb
316
+ - test/run-test.rb
317
+ - test/test-response-comparer.rb
318
+ - test/command/test-extract.rb
319
+ - test/command/test-format-regression-test-logs.rb
320
+ - test/command/test-run-regression-test.rb
321
+ - test/command/test-analyzer.rb
322
+ - test/test-replayer.rb
323
+ - test/fixtures/target-tables.expected
292
324
  - test/fixtures/reporter/html.expected
293
- - test/fixtures/reporter/json-stream.expected
294
325
  - test/fixtures/reporter/json.expected
295
- - test/fixtures/order/start-time.expected
296
- - test/fixtures/order/-start-time.expected
297
- - test/fixtures/order/-elapsed.expected
298
- - test/fixtures/order/elapsed.expected
326
+ - test/fixtures/reporter/console.expected
327
+ - test/fixtures/reporter/json-stream.expected
328
+ - test/fixtures/regression-test-logs/error.log
329
+ - test/fixtures/regression-test-logs/url-format.log
330
+ - test/fixtures/regression-test-logs/command-format.log
331
+ - test/fixtures/other-query.log
299
332
  - test/fixtures/no-report-summary.expected
300
- - test/fixtures/target-commands.expected
301
- - test/fixtures/run-regression-test/data/data.grn
333
+ - test/fixtures/run-regression-test/results/query.log
302
334
  - test/fixtures/run-regression-test/query-logs/query.log
303
- - test/fixtures/run-regression-test/indexes/indexes.grn
304
335
  - test/fixtures/run-regression-test/schema/schema.grn
305
- - test/fixtures/other-query.log
336
+ - test/fixtures/run-regression-test/indexes/indexes.grn
337
+ - test/fixtures/run-regression-test/db.new/db.0000000
338
+ - test/fixtures/run-regression-test/db.new/db.0000100
339
+ - test/fixtures/run-regression-test/db.new/db.0000103.c
340
+ - test/fixtures/run-regression-test/db.new/db
341
+ - test/fixtures/run-regression-test/db.new/db.0000102
342
+ - test/fixtures/run-regression-test/db.new/groonga.log
343
+ - test/fixtures/run-regression-test/db.new/db.001
344
+ - test/fixtures/run-regression-test/db.new/db.conf
345
+ - test/fixtures/run-regression-test/db.new/db.0000103
346
+ - test/fixtures/run-regression-test/db.new/db.0000101
347
+ - test/fixtures/run-regression-test/db.old/db.0000000
348
+ - test/fixtures/run-regression-test/db.old/db.0000100
349
+ - test/fixtures/run-regression-test/db.old/db.0000103.c
350
+ - test/fixtures/run-regression-test/db.old/db
351
+ - test/fixtures/run-regression-test/db.old/db.0000102
352
+ - test/fixtures/run-regression-test/db.old/groonga.log
353
+ - test/fixtures/run-regression-test/db.old/db.001
354
+ - test/fixtures/run-regression-test/db.old/db.conf
355
+ - test/fixtures/run-regression-test/db.old/db.0000103
356
+ - test/fixtures/run-regression-test/db.old/db.0000101
357
+ - test/fixtures/run-regression-test/data/data.grn
306
358
  - test/fixtures/query.log
307
- - test/fixtures/target-tables.expected
308
359
  - test/fixtures/n_entries.expected
309
360
  - test/fixtures/multi.expected
310
- - test/fixtures/regression-test-logs/command-format.log
311
- - test/fixtures/regression-test-logs/url-format.log
312
- - test/fixtures/regression-test-logs/error.log
313
- - test/command/test-format-regression-test-logs.rb
314
- - test/command/test-analyzer.rb
315
- - test/command/test-extract.rb
316
- - test/test-response-comparer.rb
317
- - test/test-replayer.rb
361
+ - test/fixtures/order/-elapsed.expected
362
+ - test/fixtures/order/start-time.expected
363
+ - test/fixtures/order/elapsed.expected
364
+ - test/fixtures/order/-start-time.expected
365
+ - test/fixtures/target-commands.expected
318
366
  - test/test-incompatibility-detector.rb
319
367
  - test/test-filter-rewriter.rb
320
- - test/test-parser.rb
321
- - test/helper.rb
322
- - test/run-test.rb