Class: Rafflesia::FoldIndexBenchmarkData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/proteins/fold_index_benchmark_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  backend: :backend,
  benchmark_id: :benchmark_id,
  benchmark_object: :benchmark_object,
  byte_reduction_fraction: :byte_reduction_fraction,
  created_at: :created_at,
  eligible_query_count: :eligible_query_count,
  full_scan_materialized_bytes: :full_scan_materialized_bytes,
  full_scan_object_read_count: :full_scan_object_read_count,
  full_scan_searched_shard_count: :full_scan_searched_shard_count,
  gate: :gate,
  limit: :limit,
  manifest_id: :manifest_id,
  manifest_object_id: :manifest_object_id,
  manifest_path: :manifest_path,
  nprobe: :nprobe,
  object_read_reduction_fraction: :object_read_reduction_fraction,
  passed: :passed,
  query_count: :query_count,
  recall_at: :recall_at,
  ref: :ref,
  results: :results,
  routed_fallback_count: :routed_fallback_count,
  routed_materialized_bytes: :routed_materialized_bytes,
  routed_object_read_count: :routed_object_read_count,
  routed_searched_shard_count: :routed_searched_shard_count
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ FoldIndexBenchmarkData

Returns a new instance of FoldIndexBenchmarkData.



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 63

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @backend = hash[:backend]
  @benchmark_id = hash[:benchmark_id]
  @benchmark_object = hash[:benchmark_object] ? Rafflesia::ObjectRef.new(hash[:benchmark_object]) : nil
  @byte_reduction_fraction = hash[:byte_reduction_fraction]
  @created_at = hash[:created_at]
  @eligible_query_count = hash[:eligible_query_count]
  @full_scan_materialized_bytes = hash[:full_scan_materialized_bytes]
  @full_scan_object_read_count = hash[:full_scan_object_read_count]
  @full_scan_searched_shard_count = hash[:full_scan_searched_shard_count]
  @gate = hash[:gate] ? Rafflesia::FoldIndexBenchmarkGate.new(hash[:gate]) : nil
  @limit = hash[:limit]
  @manifest_id = hash[:manifest_id]
  @manifest_object_id = hash[:manifest_object_id]
  @manifest_path = hash[:manifest_path]
  @nprobe = hash[:nprobe]
  @object_read_reduction_fraction = hash[:object_read_reduction_fraction]
  @passed = hash[:passed]
  @query_count = hash[:query_count]
  @recall_at = (hash[:recall_at] || []).map { |item| item ? Rafflesia::FoldIndexRecallMeasurement.new(item) : nil }
  @ref = hash[:ref]
  @results = (hash[:results] || []).map { |item| item ? Rafflesia::FoldIndexBenchmarkQueryResult.new(item) : nil }
  @routed_fallback_count = hash[:routed_fallback_count]
  @routed_materialized_bytes = hash[:routed_materialized_bytes]
  @routed_object_read_count = hash[:routed_object_read_count]
  @routed_searched_shard_count = hash[:routed_searched_shard_count]
end

Instance Attribute Details

#backendObject

Returns the value of attribute backend.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def backend
  @backend
end

#benchmark_idObject

Returns the value of attribute benchmark_id.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def benchmark_id
  @benchmark_id
end

#benchmark_objectObject

Returns the value of attribute benchmark_object.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def benchmark_object
  @benchmark_object
end

#byte_reduction_fractionObject

Returns the value of attribute byte_reduction_fraction.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def byte_reduction_fraction
  @byte_reduction_fraction
end

#created_atObject

Returns the value of attribute created_at.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def created_at
  @created_at
end

#eligible_query_countObject

Returns the value of attribute eligible_query_count.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def eligible_query_count
  @eligible_query_count
end

#full_scan_materialized_bytesObject

Returns the value of attribute full_scan_materialized_bytes.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def full_scan_materialized_bytes
  @full_scan_materialized_bytes
end

#full_scan_object_read_countObject

Returns the value of attribute full_scan_object_read_count.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def full_scan_object_read_count
  @full_scan_object_read_count
end

#full_scan_searched_shard_countObject

Returns the value of attribute full_scan_searched_shard_count.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def full_scan_searched_shard_count
  @full_scan_searched_shard_count
end

#gateObject

Returns the value of attribute gate.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def gate
  @gate
end

#limitObject

Returns the value of attribute limit.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def limit
  @limit
end

#manifest_idObject

Returns the value of attribute manifest_id.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def manifest_id
  @manifest_id
end

#manifest_object_idObject

Returns the value of attribute manifest_object_id.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def manifest_object_id
  @manifest_object_id
end

#manifest_pathObject

Returns the value of attribute manifest_path.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def manifest_path
  @manifest_path
end

#nprobeObject

Returns the value of attribute nprobe.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def nprobe
  @nprobe
end

#object_read_reduction_fractionObject

Returns the value of attribute object_read_reduction_fraction.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def object_read_reduction_fraction
  @object_read_reduction_fraction
end

#passedObject

Returns the value of attribute passed.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def passed
  @passed
end

#query_countObject

Returns the value of attribute query_count.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def query_count
  @query_count
end

#recall_atObject

Returns the value of attribute recall_at.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def recall_at
  @recall_at
end

#refObject

Returns the value of attribute ref.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def ref
  @ref
end

#resultsObject

Returns the value of attribute results.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def results
  @results
end

#routed_fallback_countObject

Returns the value of attribute routed_fallback_count.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def routed_fallback_count
  @routed_fallback_count
end

#routed_materialized_bytesObject

Returns the value of attribute routed_materialized_bytes.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def routed_materialized_bytes
  @routed_materialized_bytes
end

#routed_object_read_countObject

Returns the value of attribute routed_object_read_count.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def routed_object_read_count
  @routed_object_read_count
end

#routed_searched_shard_countObject

Returns the value of attribute routed_searched_shard_count.



36
37
38
# File 'lib/rafflesia/proteins/fold_index_benchmark_data.rb', line 36

def routed_searched_shard_count
  @routed_searched_shard_count
end