Class: Groonga::QueryLog::Command::ShowRunningQueries

Inherits:
Object
  • Object
show all
Defined in:
lib/groonga/query-log/command/show-running-queries.rb

Instance Method Summary collapse

Constructor Details

#initializeShowRunningQueries

Returns a new instance of ShowRunningQueries.



27
28
29
# File 'lib/groonga/query-log/command/show-running-queries.rb', line 27

def initialize
  @base_time = nil
end

Instance Method Details

#run(command_line) ⇒ Object



31
32
33
34
35
36
37
38
# File 'lib/groonga/query-log/command/show-running-queries.rb', line 31

def run(command_line)
  input_paths = create_parser.parse(command_line)
  each_parsing_statistic(input_paths) do |statistic|
    timestamp = statistic.start_time.strftime("%Y-%m-%d %H:%M:%S.%6N")
    puts("#{timestamp}:#{statistic.raw_command}")
  end
  true
end