Class: Groonga::QueryLog::Analyzer::JSONReporter

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

Instance Attribute Summary

Attributes inherited from Reporter

#output

Instance Method Summary collapse

Methods inherited from Reporter

#apply_options, #each, #initialize, #report, #report_statistics

Constructor Details

This class inherits a constructor from Groonga::QueryLog::Analyzer::Reporter

Instance Method Details

#finishObject



38
39
40
41
# File 'lib/groonga/query-log/analyzer/reporter/json.rb', line 38

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

#report_statistic(statistic) ⇒ Object



26
27
28
29
30
31
# File 'lib/groonga/query-log/analyzer/reporter/json.rb', line 26

def report_statistic(statistic)
  write(",") if @index > 0
  write("\n")
  write(format_statistic(statistic))
  @index += 1
end

#report_summaryObject



43
44
45
# File 'lib/groonga/query-log/analyzer/reporter/json.rb', line 43

def report_summary
  # TODO
end

#startObject



33
34
35
36
# File 'lib/groonga/query-log/analyzer/reporter/json.rb', line 33

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