Class: Rafflesia::CacheBenchmarkData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/cache/cache_benchmark_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  cold_cache_hit_count: :cold_cache_hit_count,
  cold_cache_miss_count: :cold_cache_miss_count,
  cold_object_read_bytes: :cold_object_read_bytes,
  cold_object_read_count: :cold_object_read_count,
  db: :db,
  evict_first: :evict_first,
  manifest_id: :manifest_id,
  manifest_object_id: :manifest_object_id,
  object_storage_backends: :object_storage_backends,
  pack_access_mode: :pack_access_mode,
  pressure_max_bytes: :pressure_max_bytes,
  program: :program,
  query: :query,
  ref: :ref,
  run_pressure: :run_pressure,
  segment_roles: :segment_roles,
  shards: :shards,
  steps: :steps,
  target_dir: :target_dir,
  total_elapsed_ms: :total_elapsed_ms,
  total_lock_wait_ms: :total_lock_wait_ms,
  verify: :verify,
  warm_cache_hit_count: :warm_cache_hit_count,
  warm_cache_miss_count: :warm_cache_miss_count,
  warm_object_read_bytes: :warm_object_read_bytes,
  warm_object_read_count: :warm_object_read_count,
  workload: :workload
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CacheBenchmarkData

Returns a new instance of CacheBenchmarkData.



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
92
93
94
95
96
97
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 67

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @cold_cache_hit_count = hash[:cold_cache_hit_count]
  @cold_cache_miss_count = hash[:cold_cache_miss_count]
  @cold_object_read_bytes = hash[:cold_object_read_bytes]
  @cold_object_read_count = hash[:cold_object_read_count]
  @db = hash[:db]
  @evict_first = hash[:evict_first]
  @manifest_id = hash[:manifest_id]
  @manifest_object_id = hash[:manifest_object_id]
  @object_storage_backends = (hash[:object_storage_backends] || [])
  @pack_access_mode = hash[:pack_access_mode]
  @pressure_max_bytes = hash[:pressure_max_bytes]
  @program = hash[:program]
  @query = hash[:query]
  @ref = hash[:ref]
  @run_pressure = hash[:run_pressure]
  @segment_roles = (hash[:segment_roles] || [])
  @shards = (hash[:shards] || [])
  @steps = (hash[:steps] || []).map { |item| item ? Rafflesia::CacheBenchmarkStep.new(item) : nil }
  @target_dir = hash[:target_dir]
  @total_elapsed_ms = hash[:total_elapsed_ms]
  @total_lock_wait_ms = hash[:total_lock_wait_ms]
  @verify = hash[:verify]
  @warm_cache_hit_count = hash[:warm_cache_hit_count]
  @warm_cache_miss_count = hash[:warm_cache_miss_count]
  @warm_object_read_bytes = hash[:warm_object_read_bytes]
  @warm_object_read_count = hash[:warm_object_read_count]
  @workload = hash[:workload]
end

Instance Attribute Details

#cold_cache_hit_countObject

Returns the value of attribute cold_cache_hit_count.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def cold_cache_hit_count
  @cold_cache_hit_count
end

#cold_cache_miss_countObject

Returns the value of attribute cold_cache_miss_count.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def cold_cache_miss_count
  @cold_cache_miss_count
end

#cold_object_read_bytesObject

Returns the value of attribute cold_object_read_bytes.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def cold_object_read_bytes
  @cold_object_read_bytes
end

#cold_object_read_countObject

Returns the value of attribute cold_object_read_count.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def cold_object_read_count
  @cold_object_read_count
end

#dbObject

Returns the value of attribute db.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def db
  @db
end

#evict_firstObject

Returns the value of attribute evict_first.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def evict_first
  @evict_first
end

#manifest_idObject

Returns the value of attribute manifest_id.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def manifest_id
  @manifest_id
end

#manifest_object_idObject

Returns the value of attribute manifest_object_id.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def manifest_object_id
  @manifest_object_id
end

#object_storage_backendsObject

Returns the value of attribute object_storage_backends.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def object_storage_backends
  @object_storage_backends
end

#pack_access_modeObject

Returns the value of attribute pack_access_mode.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def pack_access_mode
  @pack_access_mode
end

#pressure_max_bytesObject

Returns the value of attribute pressure_max_bytes.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def pressure_max_bytes
  @pressure_max_bytes
end

#programObject

Returns the value of attribute program.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def program
  @program
end

#queryObject

Returns the value of attribute query.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def query
  @query
end

#refObject

Returns the value of attribute ref.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def ref
  @ref
end

#run_pressureObject

Returns the value of attribute run_pressure.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def run_pressure
  @run_pressure
end

#segment_rolesObject

Returns the value of attribute segment_roles.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def segment_roles
  @segment_roles
end

#shardsObject

Returns the value of attribute shards.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def shards
  @shards
end

#stepsObject

Returns the value of attribute steps.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def steps
  @steps
end

#target_dirObject

Returns the value of attribute target_dir.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def target_dir
  @target_dir
end

#total_elapsed_msObject

Returns the value of attribute total_elapsed_ms.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def total_elapsed_ms
  @total_elapsed_ms
end

#total_lock_wait_msObject

Returns the value of attribute total_lock_wait_ms.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def total_lock_wait_ms
  @total_lock_wait_ms
end

#verifyObject

Returns the value of attribute verify.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def verify
  @verify
end

#warm_cache_hit_countObject

Returns the value of attribute warm_cache_hit_count.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def warm_cache_hit_count
  @warm_cache_hit_count
end

#warm_cache_miss_countObject

Returns the value of attribute warm_cache_miss_count.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def warm_cache_miss_count
  @warm_cache_miss_count
end

#warm_object_read_bytesObject

Returns the value of attribute warm_object_read_bytes.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def warm_object_read_bytes
  @warm_object_read_bytes
end

#warm_object_read_countObject

Returns the value of attribute warm_object_read_count.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def warm_object_read_count
  @warm_object_read_count
end

#workloadObject

Returns the value of attribute workload.



38
39
40
# File 'lib/rafflesia/cache/cache_benchmark_data.rb', line 38

def workload
  @workload
end