Class: NoSE::Serialize::WorkloadRepresenter
- Inherits:
-
Representable::Decorator
- Object
- Representable::Decorator
- NoSE::Serialize::WorkloadRepresenter
- Includes:
- Representable::Hash, Representable::JSON, Representable::Uncached, Representable::YAML
- Defined in:
- lib/nose/serialize.rb
Overview
Represent statements in a workload
Instance Method Summary collapse
-
#weights ⇒ Hash
Produce weights of each statement in the workload for each mix.
Methods included from Representable::Uncached
Instance Method Details
#weights ⇒ Hash
Produce weights of each statement in the workload for each mix
445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
# File 'lib/nose/serialize.rb', line 445 def weights weights = {} workload_weights = represented \ .instance_variable_get(:@statement_weights) workload_weights.each do |mix, mix_weights| weights[mix] = {} mix_weights.each do |statement, weight| statement = StatementRepresenter.represent(statement).to_hash weights[mix][statement] = weight end end weights end |