Class: GroongaQueryLog::Command::ShowRunningQueries
- Inherits:
-
Object
- Object
- GroongaQueryLog::Command::ShowRunningQueries
- Defined in:
- lib/groonga-query-log/command/show-running-queries.rb
Instance Method Summary collapse
-
#initialize ⇒ ShowRunningQueries
constructor
A new instance of ShowRunningQueries.
- #run(command_line) ⇒ Object
Constructor Details
#initialize ⇒ ShowRunningQueries
Returns a new instance of ShowRunningQueries.
26 27 28 |
# File 'lib/groonga-query-log/command/show-running-queries.rb', line 26 def initialize @base_time = nil end |
Instance Method Details
#run(command_line) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/groonga-query-log/command/show-running-queries.rb', line 30 def run(command_line) input_paths = create_parser.parse(command_line) each_parsing_statistic(input_paths) do |statistic| = statistic.start_time.strftime("%Y-%m-%d %H:%M:%S.%6N") puts("#{}:#{statistic.raw_command}") end true end |