[Groonga-commit] groonga/groonga-query-log at 57fa22e [master] server-verifier: rename to "--verify-cache" from "--verify-cachehit-mode"

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Apr 21 11:29:18 JST 2017


Kouhei Sutou	2017-04-21 11:29:18 +0900 (Fri, 21 Apr 2017)

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

  Message:
    server-verifier: rename to "--verify-cache" from "--verify-cachehit-mode"
    
    It's for consistency. We're using "--#{verb}-#{object}" rule such as
    "--care-order".

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

  Modified: lib/groonga/query-log/command/run-regression-test.rb (+2 -2)
===================================================================
--- lib/groonga/query-log/command/run-regression-test.rb    2017-04-21 11:16:17 +0900 (e2be4d2)
+++ lib/groonga/query-log/command/run-regression-test.rb    2017-04-21 11:29:18 +0900 (8a3e327)
@@ -1,4 +1,4 @@
-# Copyright (C) 2014-2015  Kouhei Sutou <kou �� clear-code.com>
+# Copyright (C) 2014-2017  Kouhei Sutou <kou �� clear-code.com>
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -409,7 +409,7 @@ module Groonga
             ]
             command_line << "--no-care-order" if @options[:care_order] == false
             command_line << query_log_path.to_s
-            command_line << "--verify-cachehit-mode" if****@new*****_persistent_cache? or****@old*****_persistent_cache?
+            command_line << "--verify-cache" if****@new*****_persistent_cache? or****@old*****_persistent_cache?
             verify_server = VerifyServer.new
             verify_server.run(command_line)
           end

  Modified: lib/groonga/query-log/command/verify-server.rb (+5 -7)
===================================================================
--- lib/groonga/query-log/command/verify-server.rb    2017-04-21 11:16:17 +0900 (30fcf55)
+++ lib/groonga/query-log/command/verify-server.rb    2017-04-21 11:29:18 +0900 (d575c2f)
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2013-2015  Kouhei Sutou <kou �� clear-code.com>
+# Copyright (C) 2013-2017  Kouhei Sutou <kou �� clear-code.com>
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -135,10 +133,10 @@ module Groonga
             @options.output_path = path
           end
 
-          parser.on("--verify-cachehit-mode",
-                    "Verify cachehit rate. After execute query, 'status' command execute.",
-                    "[#{@options.verify_cachehit_mode}]") do
-            @options.verify_cachehit_mode = true
+          parser.on("--[no-]verify-cache",
+                    "Verify cache for each query.",
+                    "[#{@options.verify_cache?}]") do |verify_cache|
+            @options.verify_cache = verify_cache
           end
 
           parser.separator("Debug options:")

  Modified: lib/groonga/query-log/server-verifier.rb (+8 -6)
===================================================================
--- lib/groonga/query-log/server-verifier.rb    2017-04-21 11:16:17 +0900 (8c82d7e)
+++ lib/groonga/query-log/server-verifier.rb    2017-04-21 11:29:18 +0900 (0509161)
@@ -1,6 +1,4 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2013-2015  Kouhei Sutou <kou �� clear-code.com>
+# Copyright (C) 2013-2017  Kouhei Sutou <kou �� clear-code.com>
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -110,7 +108,7 @@ module Groonga
 
       def verify_command(groonga1_client, groonga2_client, command)
         if command.instance_of?(Groonga::Command::Status)
-          return unles****@optio*****_cachehit_mode
+          return unles****@optio*****_cache?
         end
         command["cache"] = "no" if****@optio*****_cache?
         command["output_type"] = :json
@@ -154,7 +152,7 @@ module Groonga
         attr_accessor :target_command_names
         attr_accessor :output_path
         attr_accessor :care_order
-        attr_accessor :verify_cachehit_mode
+        attr_writer :verify_cache
         def initialize
           @groonga1 = GroongaOptions.new
           @groonga2 = GroongaOptions.new
@@ -174,7 +172,7 @@ module Groonga
             "status",
           ]
           @care_order = true
-          @verify_cahehit_mode = false
+          @verify_cache = false
         end
 
         def request_queue_size
@@ -185,6 +183,10 @@ module Groonga
           @disable_cache
         end
 
+        def verify_cache?
+          @verify_cache
+        end
+
         def target_command_name?(name)
           return false if name.nil?
 
-------------- next part --------------
HTML����������������������������...
下載 



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