Class: Cloudscale::Benchmark::BenchmarkRunResult

Inherits:
Object
  • Object
show all
Includes:
Hashable
Defined in:
lib/cloudscale/benchmark/model/benchmark/benchmark_run_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(benchmarkRun) ⇒ BenchmarkRunResult

Returns a new instance of BenchmarkRunResult.



15
16
17
18
# File 'lib/cloudscale/benchmark/model/benchmark/benchmark_run_result.rb', line 15

def initialize(benchmarkRun)
  @benchmarkRun = benchmarkRun
  @benchmarkRunResultValues = Array.new
end

Instance Attribute Details

#benchmarkRunObject

Returns the value of attribute benchmarkRun.



13
14
15
# File 'lib/cloudscale/benchmark/model/benchmark/benchmark_run_result.rb', line 13

def benchmarkRun
  @benchmarkRun
end

#benchmarkRunResultValuesObject

Returns the value of attribute benchmarkRunResultValues.



13
14
15
# File 'lib/cloudscale/benchmark/model/benchmark/benchmark_run_result.rb', line 13

def benchmarkRunResultValues
  @benchmarkRunResultValues
end

#hostnameObject

Returns the value of attribute hostname.



13
14
15
# File 'lib/cloudscale/benchmark/model/benchmark/benchmark_run_result.rb', line 13

def hostname
  @hostname
end

#ip_addressObject

Returns the value of attribute ip_address.



13
14
15
# File 'lib/cloudscale/benchmark/model/benchmark/benchmark_run_result.rb', line 13

def ip_address
  @ip_address
end

#rawBenchmarkOutputObject

Returns the value of attribute rawBenchmarkOutput.



13
14
15
# File 'lib/cloudscale/benchmark/model/benchmark/benchmark_run_result.rb', line 13

def rawBenchmarkOutput
  @rawBenchmarkOutput
end

Instance Method Details

#pushResultValue(benchmarkRunResultValue) ⇒ Object



26
27
28
# File 'lib/cloudscale/benchmark/model/benchmark/benchmark_run_result.rb', line 26

def pushResultValue(benchmarkRunResultValue)
  @benchmarkRunResultValues.push(benchmarkRunResultValue)
end

#to_hObject



20
21
22
23
24
# File 'lib/cloudscale/benchmark/model/benchmark/benchmark_run_result.rb', line 20

def to_h
  hash = {}
  instance_variables.each {|var| hash[var.to_s.delete("@")] = instance_variable_get(var) }
  return hash
end