Class: GroongaQueryLog::ResponseComparer
- Inherits:
-
Object
- Object
- GroongaQueryLog::ResponseComparer
- Defined in:
- lib/groonga-query-log/response-comparer.rb
Instance Method Summary collapse
-
#initialize(command, response1, response2, options = {}) ⇒ ResponseComparer
constructor
A new instance of ResponseComparer.
- #same? ⇒ Boolean
Constructor Details
#initialize(command, response1, response2, options = {}) ⇒ ResponseComparer
Returns a new instance of ResponseComparer.
20 21 22 23 24 25 26 27 |
# File 'lib/groonga-query-log/response-comparer.rb', line 20 def initialize(command, response1, response2, ={}) @command = command @response1 = response1 @response2 = response2 @options = .dup @options[:care_order] = true if @options[:care_order].nil? @options[:ignored_drilldown_keys] ||= [] end |
Instance Method Details
#same? ⇒ Boolean
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/groonga-query-log/response-comparer.rb', line 29 def same? if error_response?(@response1) or error_response?(@response2) if error_response?(@response1) and error_response?(@response2) same_error_response? else false end else case @command.name when "select", "logical_select" same_select_response? when "logical_range_filter" same_range_filter_response? when "status" same_cache_hit_rate? else same_response? end end end |