Class: Rafflesia::CacheMaterializationMetrics

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

Constant Summary collapse

HASH_ATTRS =
{
  all_cache_hits: :all_cache_hits,
  cache_hit_bytes: :cache_hit_bytes,
  cache_hit_count: :cache_hit_count,
  cache_miss_bytes: :cache_miss_bytes,
  cache_miss_count: :cache_miss_count,
  elapsed_ms: :elapsed_ms,
  file_count: :file_count,
  lock_wait_ms: :lock_wait_ms,
  materialization_acquired: :materialization_acquired,
  materialization_key: :materialization_key,
  materialization_owner_id: :materialization_owner_id,
  materialization_shared: :materialization_shared,
  materialization_status: :materialization_status,
  materialization_wait_ms: :materialization_wait_ms,
  object_read_bytes: :object_read_bytes,
  object_read_count: :object_read_count,
  object_storage_backends: :object_storage_backends,
  total_size_bytes: :total_size_bytes
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CacheMaterializationMetrics

Returns a new instance of CacheMaterializationMetrics.



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 49

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @all_cache_hits = hash[:all_cache_hits]
  @cache_hit_bytes = hash[:cache_hit_bytes]
  @cache_hit_count = hash[:cache_hit_count]
  @cache_miss_bytes = hash[:cache_miss_bytes]
  @cache_miss_count = hash[:cache_miss_count]
  @elapsed_ms = hash[:elapsed_ms]
  @file_count = hash[:file_count]
  @lock_wait_ms = hash[:lock_wait_ms]
  @materialization_acquired = hash[:materialization_acquired]
  @materialization_key = hash[:materialization_key]
  @materialization_owner_id = hash[:materialization_owner_id]
  @materialization_shared = hash[:materialization_shared]
  @materialization_status = hash[:materialization_status]
  @materialization_wait_ms = hash[:materialization_wait_ms]
  @object_read_bytes = hash[:object_read_bytes]
  @object_read_count = hash[:object_read_count]
  @object_storage_backends = (hash[:object_storage_backends] || [])
  @total_size_bytes = hash[:total_size_bytes]
end

Instance Attribute Details

#all_cache_hitsObject

Returns the value of attribute all_cache_hits.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def all_cache_hits
  @all_cache_hits
end

#cache_hit_bytesObject

Returns the value of attribute cache_hit_bytes.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def cache_hit_bytes
  @cache_hit_bytes
end

#cache_hit_countObject

Returns the value of attribute cache_hit_count.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def cache_hit_count
  @cache_hit_count
end

#cache_miss_bytesObject

Returns the value of attribute cache_miss_bytes.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def cache_miss_bytes
  @cache_miss_bytes
end

#cache_miss_countObject

Returns the value of attribute cache_miss_count.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def cache_miss_count
  @cache_miss_count
end

#elapsed_msObject

Returns the value of attribute elapsed_ms.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def elapsed_ms
  @elapsed_ms
end

#file_countObject

Returns the value of attribute file_count.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def file_count
  @file_count
end

#lock_wait_msObject

Returns the value of attribute lock_wait_ms.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def lock_wait_ms
  @lock_wait_ms
end

#materialization_acquiredObject

Returns the value of attribute materialization_acquired.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def materialization_acquired
  @materialization_acquired
end

#materialization_keyObject

Returns the value of attribute materialization_key.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def materialization_key
  @materialization_key
end

#materialization_owner_idObject

Returns the value of attribute materialization_owner_id.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def materialization_owner_id
  @materialization_owner_id
end

#materialization_sharedObject

Returns the value of attribute materialization_shared.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def materialization_shared
  @materialization_shared
end

#materialization_statusObject

Returns the value of attribute materialization_status.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def materialization_status
  @materialization_status
end

#materialization_wait_msObject

Returns the value of attribute materialization_wait_ms.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def materialization_wait_ms
  @materialization_wait_ms
end

#object_read_bytesObject

Returns the value of attribute object_read_bytes.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def object_read_bytes
  @object_read_bytes
end

#object_read_countObject

Returns the value of attribute object_read_count.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def object_read_count
  @object_read_count
end

#object_storage_backendsObject

Returns the value of attribute object_storage_backends.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def object_storage_backends
  @object_storage_backends
end

#total_size_bytesObject

Returns the value of attribute total_size_bytes.



29
30
31
# File 'lib/rafflesia/cache/cache_materialization_metrics.rb', line 29

def total_size_bytes
  @total_size_bytes
end