class GroongaQueryLog::Command::Analyzer::JSONReporter
Public Instance Methods
finish()
click to toggle source
# File lib/groonga-query-log/command/analyzer/reporter/json.rb, line 36 def finish write("\n") write("]\n") end
report_statistic(statistic)
click to toggle source
# File lib/groonga-query-log/command/analyzer/reporter/json.rb, line 24 def report_statistic(statistic) write(",") if @index > 0 write("\n") write(format_statistic(statistic)) @index += 1 end
report_summary()
click to toggle source
# File lib/groonga-query-log/command/analyzer/reporter/json.rb, line 41 def report_summary # TODO end
start()
click to toggle source
# File lib/groonga-query-log/command/analyzer/reporter/json.rb, line 31 def start @index = 0 write("[") end
Private Instance Methods
format_statistic(statistic)
click to toggle source
# File lib/groonga-query-log/command/analyzer/reporter/json.rb, line 46 def format_statistic(statistic) hash = statistic.to_hash hash.delete("command") unless @report_command_line JSON.generate(hash) end