Class: Cloudscale::Benchmark::BenchmarkRun

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(h) ⇒ BenchmarkRun

Returns a new instance of BenchmarkRun.



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

def initialize(h)
  h.each {|k,v| instance_variable_set("@#{k}",v)}
end

Instance Attribute Details

#batchNameObject

Returns the value of attribute batchName.



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

def batchName
  @batchName
end

#benchmarkInstanceObject

Returns the value of attribute benchmarkInstance.



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

def benchmarkInstance
  @benchmarkInstance
end

#benchmarkTestObject

Returns the value of attribute benchmarkTest.



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

def benchmarkTest
  @benchmarkTest
end

#benchmarkTestSuiteObject

Returns the value of attribute benchmarkTestSuite.



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

def benchmarkTestSuite
  @benchmarkTestSuite
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#scheduledObject

Returns the value of attribute scheduled.



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

def scheduled
  @scheduled
end

#sequenceObject

Returns the value of attribute sequence.



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

def sequence
  @sequence
end

#startedObject

Returns the value of attribute started.



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

def started
  @started
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
end

#statusMessageObject

Returns the value of attribute statusMessage.



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

def statusMessage
  @statusMessage
end

#stoppedObject

Returns the value of attribute stopped.



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

def stopped
  @stopped
end

Instance Method Details

#failed!(msg) ⇒ Object



42
43
44
45
46
47
48
# File 'lib/cloudscale/benchmark/model/benchmark/benchmark_run.rb', line 42

def failed!(msg)
  @status = "failed"
  if (msg)
    @statusMessage = msg
  end
  @stopped = Time.now.utc.to_s
end

#get_status_hashObject



58
59
60
61
62
63
# File 'lib/cloudscale/benchmark/model/benchmark/benchmark_run.rb', line 58

def get_status_hash
  hash = {}
  hash["status"] = @status
  hash["statusMessage"] = @statusMessage
  hash
end

#no_result!(msg) ⇒ Object



50
51
52
53
54
55
56
# File 'lib/cloudscale/benchmark/model/benchmark/benchmark_run.rb', line 50

def no_result!(msg)
  @status = "no results"
  if (msg)
    @statusMessage = msg
  end
  @stopped = Time.now.utc.to_s
end

#running!(msg) ⇒ Object

See Also:

  • Cloudscale::Benchmark::BenchmarkRun.dede.cloudscalede.cloudscale.modelde.cloudscale.model.nosqlde.cloudscale.model.nosql.constantsde.cloudscale.model.nosql.constants.benchmarkde.cloudscale.model.nosql.constants.benchmark.BenchmarkRunStatusTypede.cloudscale.model.nosql.constants.benchmark.BenchmarkRunStatusType.java


26
27
28
29
30
31
32
# File 'lib/cloudscale/benchmark/model/benchmark/benchmark_run.rb', line 26

def running!(msg)
  @status = "running"
  if (msg)
    @statusMessage = msg
  end
  @started = Time.now.utc.to_s
end

#succeed!(msg) ⇒ Object



34
35
36
37
38
39
40
# File 'lib/cloudscale/benchmark/model/benchmark/benchmark_run.rb', line 34

def succeed!(msg)
  @status = "succeeded"
  if (msg)
    @statusMessage = msg
  end
  @stopped = Time.now.utc.to_s
end

#to_hObject



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

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