class NoSE::Serialize::WorkloadRepresenter

Represent statements in a workload

Public Instance Methods

weights() click to toggle source

Produce weights of each statement in the workload for each mix @return [Hash]

# 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