[Groonga-commit] groonga/groonga-query-log at e19c1cb [master] Add new feature that limits option of groonga.

Back to archive index

HorimotoYasuhiro null+****@clear*****
Tue Apr 11 13:57:35 JST 2017


HorimotoYasuhiro	2017-04-11 13:57:35 +0900 (Tue, 11 Apr 2017)

  New Revision: e19c1cb27954c3574e9351db714544a24f1d01c0
  https://github.com/groonga/groonga-query-log/commit/e19c1cb27954c3574e9351db714544a24f1d01c0

  Merged 47fec05: Merge pull request #5 from komainu8/feature/add_new_option

  Message:
    Add new feature that limits option of groonga.

  Modified files:
    lib/groonga/query-log/command/run-regression-test.rb

  Modified: lib/groonga/query-log/command/run-regression-test.rb (+25 -6)
===================================================================
--- lib/groonga/query-log/command/run-regression-test.rb    2017-04-10 17:41:47 +0900 (cfc3465)
+++ lib/groonga/query-log/command/run-regression-test.rb    2017-04-11 13:57:35 +0900 (922a7da)
@@ -177,16 +177,37 @@ module Groonga
           directory_options.merge(options)
         end
 
+        def groonga_options(options)
+          groonga_options = Hash[*options]
+
+          filter = %w[
+            --server-id
+            --document-root
+            --cache-limit
+            --max-threads
+            --default-request-timeout
+            --memcached-column
+            --cache-base-path
+            --log-level
+            --log-rotate-threshold
+            --query-log-rotate-threshold
+            --config-path
+            --default-command-version
+            --default-match-escalation-threshold
+          ]
+          groonga_options.keep_if{|k,v| filter.include?(k)}
+        end
+
         def old_groonga_server
           GroongaServer.new(@old_groonga,
-                            @old_groonga_options,
+                            groonga_options(@old_groonga_options),
                             @old_database,
                             server_options)
         end
 
         def new_groonga_server
           GroongaServer.new(@new_groonga,
-                            @new_groonga_options,
+                            groonga_options(@new_groonga_options),
                             @new_database,
                             server_options)
         end
@@ -213,11 +234,9 @@ module Groonga
               "--protocol", "http",
               "--log-path", log_path.to_s,
             ]
-
-            @groonga_options.each{|groonga_option|
-              arguments << groonga_option
+            @groonga_options.each{|name, value|
+              arguments.concat([name, value])
             }
-
             if @options[:output_query_log]
               arguments.concat(["--query-log-path", query_log_path.to_s])
             end
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index