groonga-query-log 1.4.1 → 1.4.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 +4 -4
- data/doc/text/news.md +6 -0
- data/lib/groonga-query-log/parser.rb +1 -1
- data/lib/groonga-query-log/version.rb +1 -1
- data/test/test-parser.rb +43 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15ee5ce18ea1e8a51a67e888adb04e370b3a1925ecd026c108da514cc3b51016
|
4
|
+
data.tar.gz: 6ff5205f282c77e3ccbe0b3b75df9e87f0dc5f253c0da552fca321cef9795e41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43b3d1ad97d7d65daa54f82e5acef19b3e6798f4254955ee92ea061b0bb6a5db2239757ae49509b5f11e2c4605e6a3a69e2b7fd890c4fab45577176e5abe0551
|
7
|
+
data.tar.gz: 37a2505063f45afa95d16c7cbe596fdef5d1d383fa9046ca90aa5f760ee601c16157b6bc3d8a6bef9272e1d6eebf6927402077cce4e714d891642f1266d710e5
|
data/doc/text/news.md
CHANGED
data/test/test-parser.rb
CHANGED
@@ -326,6 +326,49 @@ class ParserTest < Test::Unit::TestCase
|
|
326
326
|
]
|
327
327
|
assert_equal(expected, operations)
|
328
328
|
end
|
329
|
+
|
330
|
+
def test_labeled_drilldown_columns
|
331
|
+
statistics = parse(<<-LOG)
|
332
|
+
2019-05-13 17:56:57.353124|0x7ffe678ba4e0|>logical_select Logs --shard_key timestamp --output_columns _id --limit 0 --drilldowns[item].keys items --drilldowns[item].sort_keys price --drilldowns[item].output_columns _key,_nsubrecs,price,price_with_tax --drilldowns[item].columns[price_with_tax].stage initial --drilldowns[item].columns[price_with_tax].type UInt32 --drilldowns[item].columns[price_with_tax].flags COLUMN_SCALAR --drilldowns[item].columns[price_with_tax].value 'price * 1.08' --drilldowns[real_price].table item --drilldowns[real_price].keys price_with_tax --output_type json
|
333
|
+
2019-05-13 17:56:57.355173|0x7ffe678ba4e0|:000000002051683 select(2)[Logs_20170315]
|
334
|
+
2019-05-13 17:56:57.355191|0x7ffe678ba4e0|:000000002068357 select(2)[Logs_20170316]
|
335
|
+
2019-05-13 17:56:57.355204|0x7ffe678ba4e0|:000000002081732 select(2)[Logs_20170317]
|
336
|
+
2019-05-13 17:56:57.355420|0x7ffe678ba4e0|:000000002298949 drilldowns[item](6)
|
337
|
+
2019-05-13 17:56:57.355571|0x7ffe678ba4e0|:000000002449229 drilldowns[item].columns[price_with_tax](6)
|
338
|
+
2019-05-13 17:56:57.355671|0x7ffe678ba4e0|:000000002548867 drilldowns[real_price](3)
|
339
|
+
2019-05-13 17:56:57.355723|0x7ffe678ba4e0|:000000002600511 output(0)
|
340
|
+
2019-05-13 17:56:57.355780|0x7ffe678ba4e0|:000000002657685 drilldowns[item].sort(6): price
|
341
|
+
2019-05-13 17:56:57.355842|0x7ffe678ba4e0|:000000002720445 output.drilldowns[item](6)
|
342
|
+
2019-05-13 17:56:57.355878|0x7ffe678ba4e0|:000000002755476 output.drilldowns[real_price](3)
|
343
|
+
2019-05-13 17:56:57.355981|0x7ffe678ba4e0|<000000002859294 rc=0
|
344
|
+
LOG
|
345
|
+
operations = statistics.first.operations.collect do |operation|
|
346
|
+
[operation[:name], operation[:raw_message]]
|
347
|
+
end
|
348
|
+
expected = [
|
349
|
+
["select[Logs_20170315]",
|
350
|
+
"select(2)[Logs_20170315]"],
|
351
|
+
["select[Logs_20170316]",
|
352
|
+
"select(2)[Logs_20170316]"],
|
353
|
+
["select[Logs_20170317]",
|
354
|
+
"select(2)[Logs_20170317]"],
|
355
|
+
["drilldowns[item]",
|
356
|
+
"drilldowns[item](6)"],
|
357
|
+
["drilldowns[item].columns[price_with_tax]",
|
358
|
+
"drilldowns[item].columns[price_with_tax](6)"],
|
359
|
+
["drilldowns[real_price]",
|
360
|
+
"drilldowns[real_price](3)"],
|
361
|
+
["output",
|
362
|
+
"output(0)"],
|
363
|
+
["drilldowns[item].sort",
|
364
|
+
"drilldowns[item].sort(6): price"],
|
365
|
+
["output.drilldowns[item]",
|
366
|
+
"output.drilldowns[item](6)"],
|
367
|
+
["output.drilldowns[real_price]",
|
368
|
+
"output.drilldowns[real_price](3)"]
|
369
|
+
]
|
370
|
+
assert_equal(expected, operations)
|
371
|
+
end
|
329
372
|
end
|
330
373
|
|
331
374
|
class ExtraFieldTest < self
|
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.
|
4
|
+
version: 1.4.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: 2019-05-
|
11
|
+
date: 2019-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: groonga-command-parser
|