Class: Rafflesia::CacheBenchmarkSuiteData

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

Constant Summary collapse

HASH_ATTRS =
{
  benchmark_object: :benchmark_object,
  case_count: :case_count,
  cases: :cases,
  completed_at: :completed_at,
  failed_count: :failed_count,
  gates: :gates,
  object_storage_backends: :object_storage_backends,
  passed: :passed,
  passed_count: :passed_count,
  schema_version: :schema_version,
  started_at: :started_at,
  suite_id: :suite_id,
  suite_name: :suite_name,
  suite_version: :suite_version,
  workload_profile: :workload_profile
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CacheBenchmarkSuiteData

Returns a new instance of CacheBenchmarkSuiteData.



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 43

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @benchmark_object = hash[:benchmark_object] ? Rafflesia::ObjectRef.new(hash[:benchmark_object]) : nil
  @case_count = hash[:case_count]
  @cases = (hash[:cases] || []).map { |item| item ? Rafflesia::CacheBenchmarkSuiteCaseData.new(item) : nil }
  @completed_at = hash[:completed_at]
  @failed_count = hash[:failed_count]
  @gates = (hash[:gates] || []).map { |item| item ? Rafflesia::CacheBenchmarkSuiteGate.new(item) : nil }
  @object_storage_backends = (hash[:object_storage_backends] || [])
  @passed = hash[:passed]
  @passed_count = hash[:passed_count]
  @schema_version = hash[:schema_version]
  @started_at = hash[:started_at]
  @suite_id = hash[:suite_id]
  @suite_name = hash[:suite_name]
  @suite_version = hash[:suite_version]
  @workload_profile = hash[:workload_profile] ? Rafflesia::ServerlessWorkloadProfile.new(hash[:workload_profile]) : nil
end

Instance Attribute Details

#benchmark_objectObject

Returns the value of attribute benchmark_object.



26
27
28
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 26

def benchmark_object
  @benchmark_object
end

#case_countObject

Returns the value of attribute case_count.



26
27
28
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 26

def case_count
  @case_count
end

#casesObject

Returns the value of attribute cases.



26
27
28
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 26

def cases
  @cases
end

#completed_atObject

Returns the value of attribute completed_at.



26
27
28
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 26

def completed_at
  @completed_at
end

#failed_countObject

Returns the value of attribute failed_count.



26
27
28
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 26

def failed_count
  @failed_count
end

#gatesObject

Returns the value of attribute gates.



26
27
28
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 26

def gates
  @gates
end

#object_storage_backendsObject

Returns the value of attribute object_storage_backends.



26
27
28
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 26

def object_storage_backends
  @object_storage_backends
end

#passedObject

Returns the value of attribute passed.



26
27
28
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 26

def passed
  @passed
end

#passed_countObject

Returns the value of attribute passed_count.



26
27
28
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 26

def passed_count
  @passed_count
end

#schema_versionObject

Returns the value of attribute schema_version.



26
27
28
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 26

def schema_version
  @schema_version
end

#started_atObject

Returns the value of attribute started_at.



26
27
28
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 26

def started_at
  @started_at
end

#suite_idObject

Returns the value of attribute suite_id.



26
27
28
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 26

def suite_id
  @suite_id
end

#suite_nameObject

Returns the value of attribute suite_name.



26
27
28
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 26

def suite_name
  @suite_name
end

#suite_versionObject

Returns the value of attribute suite_version.



26
27
28
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 26

def suite_version
  @suite_version
end

#workload_profileObject

Returns the value of attribute workload_profile.



26
27
28
# File 'lib/rafflesia/cache/cache_benchmark_suite_data.rb', line 26

def workload_profile
  @workload_profile
end