groonga-query-log 1.5.4 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +12 -0
- data/lib/groonga-query-log/command/run-regression-test.rb +16 -0
- data/lib/groonga-query-log/command/verify-server.rb +21 -5
- data/lib/groonga-query-log/performance-verifier.rb +29 -6
- data/lib/groonga-query-log/server-verifier.rb +6 -1
- data/lib/groonga-query-log/version.rb +1 -1
- data/test/#test-response-comparer.rb# +14750 -0
- data/test/fixtures/run-regression-test/mail-notifier/error.log +5 -0
- data/test/test-performance-verifier.rb +64 -0
- metadata +50 -47
- data/test/fixtures/run-regression-test/results/query.log.log +0 -0
@@ -0,0 +1,64 @@
|
|
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
|
+
class PerformanceVerifierTest < Test::Unit::TestCase
|
18
|
+
def setup
|
19
|
+
@old_responses = build_responses([0.3, 0.2, 0.1])
|
20
|
+
@new_responses = build_responses([0.9, 0.5, 0.7])
|
21
|
+
@options = GroongaQueryLog::PerformanceVerifier::Options.new
|
22
|
+
end
|
23
|
+
|
24
|
+
def build_responses(elapsed_times)
|
25
|
+
elapsed_times.collect do |elapsed_time|
|
26
|
+
header = [0, 0, elapsed_time]
|
27
|
+
Groonga::Client::Response::Base.new(nil, header, nil)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def build_verifier
|
32
|
+
GroongaQueryLog::PerformanceVerifier.new(nil,
|
33
|
+
@old_responses,
|
34
|
+
@new_responses,
|
35
|
+
@options)
|
36
|
+
end
|
37
|
+
|
38
|
+
sub_test_case(":choose_strategy") do
|
39
|
+
sub_test_case(":fastest") do
|
40
|
+
def test_old_elapsed_time
|
41
|
+
assert_equal(0.1, build_verifier.old_elapsed_time)
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_new_elapsed_time
|
45
|
+
assert_equal(0.5, build_verifier.new_elapsed_time)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
sub_test_case(":median") do
|
50
|
+
def setup
|
51
|
+
super
|
52
|
+
@options.choose_strategy = :median
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_old_elapsed_time
|
56
|
+
assert_equal(0.2, build_verifier.old_elapsed_time)
|
57
|
+
end
|
58
|
+
|
59
|
+
def test_new_elapsed_time
|
60
|
+
assert_equal(0.7, build_verifier.new_elapsed_time)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
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.5.
|
4
|
+
version: 1.5.5
|
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-10-
|
11
|
+
date: 2019-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: charty
|
@@ -168,18 +168,18 @@ description: ''
|
|
168
168
|
email:
|
169
169
|
- kou@clear-code.com
|
170
170
|
executables:
|
171
|
+
- groonga-query-log-detect-memory-leak
|
171
172
|
- groonga-query-log-analyze
|
172
|
-
- groonga-query-log-analyze-load
|
173
173
|
- groonga-query-log-check-crash
|
174
|
-
- groonga-query-log-extract
|
175
|
-
- groonga-query-log-check-command-version-compatibility
|
176
|
-
- groonga-query-log-check-performance-regression
|
177
174
|
- groonga-query-log-replay
|
178
|
-
- groonga-query-log-
|
179
|
-
- groonga-query-log-detect-memory-leak
|
175
|
+
- groonga-query-log-extract
|
180
176
|
- groonga-query-log-show-running-queries
|
181
|
-
- groonga-query-log-
|
177
|
+
- groonga-query-log-check-command-version-compatibility
|
182
178
|
- groonga-query-log-run-regression-test
|
179
|
+
- groonga-query-log-verify-server
|
180
|
+
- groonga-query-log-analyze-load
|
181
|
+
- groonga-query-log-format-regression-test-logs
|
182
|
+
- groonga-query-log-check-performance-regression
|
183
183
|
extensions: []
|
184
184
|
extra_rdoc_files: []
|
185
185
|
files:
|
@@ -249,6 +249,7 @@ files:
|
|
249
249
|
- lib/groonga/query-log/command/run-regression-test.rb
|
250
250
|
- lib/groonga/query-log/command/show-running-queries.rb
|
251
251
|
- lib/groonga/query-log/command/verify-server.rb
|
252
|
+
- test/#test-response-comparer.rb#
|
252
253
|
- test/command/test-analyzer.rb
|
253
254
|
- test/command/test-check-performance-regression.rb
|
254
255
|
- test/command/test-extract.rb
|
@@ -280,10 +281,10 @@ files:
|
|
280
281
|
- test/fixtures/reporter/json.expected
|
281
282
|
- test/fixtures/run-regression-test/data/data.grn
|
282
283
|
- test/fixtures/run-regression-test/indexes/indexes.grn
|
284
|
+
- test/fixtures/run-regression-test/mail-notifier/error.log
|
283
285
|
- test/fixtures/run-regression-test/mail-notifier/failure.log
|
284
286
|
- test/fixtures/run-regression-test/mail-notifier/success.log
|
285
287
|
- test/fixtures/run-regression-test/query-logs/query.log
|
286
|
-
- test/fixtures/run-regression-test/results/query.log.log
|
287
288
|
- test/fixtures/run-regression-test/schema/schema.grn
|
288
289
|
- test/fixtures/target-commands.expected
|
289
290
|
- test/fixtures/target-tables.expected
|
@@ -292,6 +293,7 @@ files:
|
|
292
293
|
- test/test-filter-rewriter.rb
|
293
294
|
- test/test-incompatibility-detector.rb
|
294
295
|
- test/test-parser.rb
|
296
|
+
- test/test-performance-verifier.rb
|
295
297
|
- test/test-replayer.rb
|
296
298
|
- test/test-response-comparer.rb
|
297
299
|
homepage: https://github.com/groonga/groonga-query-log
|
@@ -313,8 +315,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
313
315
|
- !ruby/object:Gem::Version
|
314
316
|
version: '0'
|
315
317
|
requirements: []
|
316
|
-
|
317
|
-
rubygems_version: 2.7.6.2
|
318
|
+
rubygems_version: 3.0.3
|
318
319
|
signing_key:
|
319
320
|
specification_version: 4
|
320
321
|
summary: Groonga-query-log is a collection of library and tools to process [Groonga](http://groonga.org/)'s
|
@@ -322,48 +323,50 @@ summary: Groonga-query-log is a collection of library and tools to process [Groo
|
|
322
323
|
as a library. You can analyze your Groonga's queries and test with your Groonga's
|
323
324
|
query log by using groonga-query-log as a tool.
|
324
325
|
test_files:
|
325
|
-
- test/test-parser.rb
|
326
|
-
- test/helper.rb
|
327
326
|
- test/run-test.rb
|
328
|
-
- test/
|
329
|
-
- test/
|
330
|
-
- test/
|
331
|
-
- test/
|
332
|
-
- test/
|
333
|
-
- test/
|
334
|
-
- test/
|
327
|
+
- test/fixtures/n_entries.expected
|
328
|
+
- test/fixtures/check-performance-regression/query1.log
|
329
|
+
- test/fixtures/check-performance-regression/cache.log
|
330
|
+
- test/fixtures/check-performance-regression/different_operations2.log
|
331
|
+
- test/fixtures/check-performance-regression/nquery2.log
|
332
|
+
- test/fixtures/check-performance-regression/nquery.log
|
333
|
+
- test/fixtures/check-performance-regression/query2.log
|
334
|
+
- test/fixtures/check-performance-regression/different_operations1.log
|
335
335
|
- test/fixtures/target-tables.expected
|
336
|
-
- test/fixtures/
|
337
|
-
- test/fixtures/
|
338
|
-
- test/fixtures/
|
339
|
-
- test/fixtures/
|
340
|
-
- test/fixtures/
|
336
|
+
- test/fixtures/no-report-summary.expected
|
337
|
+
- test/fixtures/order/-start-time.expected
|
338
|
+
- test/fixtures/order/-elapsed.expected
|
339
|
+
- test/fixtures/order/start-time.expected
|
340
|
+
- test/fixtures/order/elapsed.expected
|
341
341
|
- test/fixtures/regression-test-logs/url-format.log
|
342
|
-
- test/fixtures/regression-test-logs/slow.log
|
343
342
|
- test/fixtures/regression-test-logs/command-format.log
|
343
|
+
- test/fixtures/regression-test-logs/slow.log
|
344
|
+
- test/fixtures/regression-test-logs/error.log
|
345
|
+
- test/fixtures/multi.expected
|
346
|
+
- test/fixtures/query.log
|
344
347
|
- test/fixtures/other-query.log
|
345
|
-
- test/fixtures/
|
346
|
-
- test/fixtures/
|
347
|
-
- test/fixtures/
|
348
|
+
- test/fixtures/reporter/json-stream.expected
|
349
|
+
- test/fixtures/reporter/console.expected
|
350
|
+
- test/fixtures/reporter/json.expected
|
351
|
+
- test/fixtures/reporter/html.expected
|
348
352
|
- test/fixtures/run-regression-test/schema/schema.grn
|
349
|
-
- test/fixtures/run-regression-test/indexes/indexes.grn
|
350
|
-
- test/fixtures/run-regression-test/mail-notifier/failure.log
|
351
|
-
- test/fixtures/run-regression-test/mail-notifier/success.log
|
352
353
|
- test/fixtures/run-regression-test/data/data.grn
|
353
|
-
- test/fixtures/
|
354
|
-
- test/fixtures/
|
355
|
-
- test/fixtures/
|
356
|
-
- test/fixtures/
|
357
|
-
- test/fixtures/
|
358
|
-
- test/fixtures/order/elapsed.expected
|
359
|
-
- test/fixtures/order/-start-time.expected
|
360
|
-
- test/fixtures/check-performance-regression/query1.log
|
361
|
-
- test/fixtures/check-performance-regression/nquery2.log
|
362
|
-
- test/fixtures/check-performance-regression/different_operations1.log
|
363
|
-
- test/fixtures/check-performance-regression/cache.log
|
364
|
-
- test/fixtures/check-performance-regression/query2.log
|
365
|
-
- test/fixtures/check-performance-regression/different_operations2.log
|
366
|
-
- test/fixtures/check-performance-regression/nquery.log
|
354
|
+
- test/fixtures/run-regression-test/mail-notifier/success.log
|
355
|
+
- test/fixtures/run-regression-test/mail-notifier/error.log
|
356
|
+
- test/fixtures/run-regression-test/mail-notifier/failure.log
|
357
|
+
- test/fixtures/run-regression-test/indexes/indexes.grn
|
358
|
+
- test/fixtures/run-regression-test/query-logs/query.log
|
367
359
|
- test/fixtures/target-commands.expected
|
360
|
+
- test/test-parser.rb
|
361
|
+
- test/helper.rb
|
362
|
+
- test/#test-response-comparer.rb#
|
363
|
+
- test/test-replayer.rb
|
364
|
+
- test/test-response-comparer.rb
|
365
|
+
- test/command/test-run-regression-test.rb
|
366
|
+
- test/command/test-check-performance-regression.rb
|
367
|
+
- test/command/test-format-regression-test-logs.rb
|
368
|
+
- test/command/test-analyzer.rb
|
369
|
+
- test/command/test-extract.rb
|
368
370
|
- test/test-incompatibility-detector.rb
|
371
|
+
- test/test-performance-verifier.rb
|
369
372
|
- test/test-filter-rewriter.rb
|
File without changes
|