Class: GroongaQueryLog::Command::Analyzer::JSONReporter

Inherits:
Reporter
  • Object
show all
Defined in:
lib/groonga-query-log/command/analyzer/reporter/json.rb

Instance Attribute Summary

Attributes inherited from Reporter

#output, #slow_operation_threshold, #slow_response_threshold

Instance Method Summary collapse

Methods inherited from Reporter

#each, #initialize, #report, #report_statistics

Constructor Details

This class inherits a constructor from GroongaQueryLog::Command::Analyzer::Reporter

Instance Method Details

#finishObject



36
37
38
39
# File 'lib/groonga-query-log/command/analyzer/reporter/json.rb', line 36

def finish
  write("\n")
  write("]\n")
end

#report_statistic(statistic) ⇒ Object



24
25
26
27
28
29
# 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_summaryObject



41
42
43
# File 'lib/groonga-query-log/command/analyzer/reporter/json.rb', line 41

def report_summary
  # TODO
end

#startObject



31
32
33
34
# File 'lib/groonga-query-log/command/analyzer/reporter/json.rb', line 31

def start
  @index = 0
  write("[")
end