[Groonga-commit] groonga/groonga-query-log at 8276256 [master] Use the same variable name for option name

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jun 23 18:03:02 JST 2014


Kouhei Sutou	2014-06-23 18:03:02 +0900 (Mon, 23 Jun 2014)

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

  Message:
    Use the same variable name for option name

  Modified files:
    lib/groonga/query-log/command/show-running-queries.rb

  Modified: lib/groonga/query-log/command/show-running-queries.rb (+6 -6)
===================================================================
--- lib/groonga/query-log/command/show-running-queries.rb    2014-06-23 17:59:55 +0900 (9625576)
+++ lib/groonga/query-log/command/show-running-queries.rb    2014-06-23 18:03:02 +0900 (d602356)
@@ -25,7 +25,7 @@ module Groonga
     module Command
       class ShowRunningQueries
         def initialize
-          @timestamp = nil
+          @base_time = nil
         end
 
         def run(command_line)
@@ -49,8 +49,8 @@ module Groonga
           parser.on("--base-time=TIME",
                     "Show running queries at TIME",
                     "You can use popular time format for TIME such as W3C-DTF",
-                    "(now)") do |timestamp|
-            @timestamp = Time.parse(timestamp)
+                    "(now)") do |base_time|
+            @base_time = Time.parse(base_time)
           end
         end
 
@@ -60,9 +60,9 @@ module Groonga
             input_paths.each do |input_path|
               File.open(input_path) do |input|
                 parser.parse(input) do |statistic|
-                  next if****@times*****?
-                  next if statistic.start_time < @timestamp
-                  if statistic.start_time == @timestamp
+                  next if @base_time.nil?
+                  next if statistic.start_time < @base_time
+                  if statistic.start_time == @base_time
                     yield(statistic)
                   end
                   throw(tag)
-------------- next part --------------
HTML����������������������������...
Download 



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