[Groonga-commit] groonga/groonga-query-log at 22c9f7a [master] Add --disable-cache option

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Tue May 28 14:54:09 JST 2013


Kouhei Sutou	2013-05-28 14:54:09 +0900 (Tue, 28 May 2013)

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

  Message:
    Add --disable-cache option
    
    It is for benckmark.

  Modified files:
    lib/groonga/query-log/replayer.rb

  Modified: lib/groonga/query-log/replayer.rb (+12 -0)
===================================================================
--- lib/groonga/query-log/replayer.rb    2013-05-24 19:00:53 +0900 (6de8314)
+++ lib/groonga/query-log/replayer.rb    2013-05-28 14:54:09 +0900 (3d7e315)
@@ -79,6 +79,7 @@ module Groonga
       end
 
       def replay_command(client, id, command)
+        command["cache"] = "no" if****@optio*****_cache?
         response = client.execute(command)
         @responses.push(response)
       end
@@ -123,6 +124,7 @@ module Groonga
           @port = 10041
           @protocol = :gqtp
           @n_clients = 8
+          @disable_cache = false
           @requests_path = nil
           @responses_path = nil
         end
@@ -154,6 +156,10 @@ module Groonga
           end
         end
 
+        def disable_cache?
+          @disable_cache
+        end
+
         private
         def create_parser
           parser = OptionParser.new
@@ -188,6 +194,12 @@ module Groonga
             @n_cilents = n_clients
           end
 
+          parser.on("--disable-cache",
+                    "Add 'cache=no' parameter to request",
+                    "[#{@disable_cache}]") do
+            @disable_cache = true
+          end
+
           parser.on("--output-requests=PATH",
                     "Output requests to PATH",
                     "[not output]") do |path|
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る