Class: Rafflesia::CacheBenchmarkSuiteCaseData

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

Constant Summary collapse

HASH_ATTRS =
{
  benchmark: :benchmark,
  name: :name,
  passed: :passed,
  reasons: :reasons,
  workload: :workload
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CacheBenchmarkSuiteCaseData

Returns a new instance of CacheBenchmarkSuiteCaseData.



23
24
25
26
27
28
29
30
31
# File 'lib/rafflesia/cache/cache_benchmark_suite_case_data.rb', line 23

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @benchmark = hash[:benchmark] ? Rafflesia::CacheBenchmarkData.new(hash[:benchmark]) : nil
  @name = hash[:name]
  @passed = hash[:passed]
  @reasons = (hash[:reasons] || [])
  @workload = hash[:workload]
end

Instance Attribute Details

#benchmarkObject

Returns the value of attribute benchmark.



16
17
18
# File 'lib/rafflesia/cache/cache_benchmark_suite_case_data.rb', line 16

def benchmark
  @benchmark
end

#nameObject

Returns the value of attribute name.



16
17
18
# File 'lib/rafflesia/cache/cache_benchmark_suite_case_data.rb', line 16

def name
  @name
end

#passedObject

Returns the value of attribute passed.



16
17
18
# File 'lib/rafflesia/cache/cache_benchmark_suite_case_data.rb', line 16

def passed
  @passed
end

#reasonsObject

Returns the value of attribute reasons.



16
17
18
# File 'lib/rafflesia/cache/cache_benchmark_suite_case_data.rb', line 16

def reasons
  @reasons
end

#workloadObject

Returns the value of attribute workload.



16
17
18
# File 'lib/rafflesia/cache/cache_benchmark_suite_case_data.rb', line 16

def workload
  @workload
end