Class: Rafflesia::SequenceCandidateBenchmarkQueryResult

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/sequences/sequence_candidate_benchmark_query_result.rb

Constant Summary collapse

HASH_ATTRS =
{
  candidate_count: :candidate_count,
  elapsed_ms: :elapsed_ms,
  hit_count: :hit_count,
  object_bytes_fetched: :object_bytes_fetched,
  object_read_count: :object_read_count,
  passed: :passed,
  query_id: :query_id,
  query_length: :query_length,
  reasons: :reasons,
  recall_at_k: :recall_at_k,
  top_hit_id: :top_hit_id,
  top_hit_identity: :top_hit_identity,
  warnings: :warnings
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ SequenceCandidateBenchmarkQueryResult

Returns a new instance of SequenceCandidateBenchmarkQueryResult.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_query_result.rb', line 39

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @candidate_count = hash[:candidate_count]
  @elapsed_ms = hash[:elapsed_ms]
  @hit_count = hash[:hit_count]
  @object_bytes_fetched = hash[:object_bytes_fetched]
  @object_read_count = hash[:object_read_count]
  @passed = hash[:passed]
  @query_id = hash[:query_id]
  @query_length = hash[:query_length]
  @reasons = (hash[:reasons] || [])
  @recall_at_k = hash[:recall_at_k]
  @top_hit_id = hash[:top_hit_id]
  @top_hit_identity = hash[:top_hit_identity]
  @warnings = (hash[:warnings] || [])
end

Instance Attribute Details

#candidate_countObject

Returns the value of attribute candidate_count.



24
25
26
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_query_result.rb', line 24

def candidate_count
  @candidate_count
end

#elapsed_msObject

Returns the value of attribute elapsed_ms.



24
25
26
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_query_result.rb', line 24

def elapsed_ms
  @elapsed_ms
end

#hit_countObject

Returns the value of attribute hit_count.



24
25
26
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_query_result.rb', line 24

def hit_count
  @hit_count
end

#object_bytes_fetchedObject

Returns the value of attribute object_bytes_fetched.



24
25
26
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_query_result.rb', line 24

def object_bytes_fetched
  @object_bytes_fetched
end

#object_read_countObject

Returns the value of attribute object_read_count.



24
25
26
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_query_result.rb', line 24

def object_read_count
  @object_read_count
end

#passedObject

Returns the value of attribute passed.



24
25
26
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_query_result.rb', line 24

def passed
  @passed
end

#query_idObject

Returns the value of attribute query_id.



24
25
26
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_query_result.rb', line 24

def query_id
  @query_id
end

#query_lengthObject

Returns the value of attribute query_length.



24
25
26
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_query_result.rb', line 24

def query_length
  @query_length
end

#reasonsObject

Returns the value of attribute reasons.



24
25
26
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_query_result.rb', line 24

def reasons
  @reasons
end

#recall_at_kObject

Returns the value of attribute recall_at_k.



24
25
26
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_query_result.rb', line 24

def recall_at_k
  @recall_at_k
end

#top_hit_idObject

Returns the value of attribute top_hit_id.



24
25
26
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_query_result.rb', line 24

def top_hit_id
  @top_hit_id
end

#top_hit_identityObject

Returns the value of attribute top_hit_identity.



24
25
26
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_query_result.rb', line 24

def top_hit_identity
  @top_hit_identity
end

#warningsObject

Returns the value of attribute warnings.



24
25
26
# File 'lib/rafflesia/sequences/sequence_candidate_benchmark_query_result.rb', line 24

def warnings
  @warnings
end