Class: NodeUsagePercentagePerExecutionType

Inherits:
Object
  • Object
show all
Defined in:
app/services/node_usage_percentage_per_execution_type.rb

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ NodeUsagePercentagePerExecutionType

Returns a new instance of NodeUsagePercentagePerExecutionType.



4
5
6
# File 'app/services/node_usage_percentage_per_execution_type.rb', line 4

def initialize(node)
  @node = node
end

Instance Method Details

#performObject



8
9
10
11
12
13
14
15
# File 'app/services/node_usage_percentage_per_execution_type.rb', line 8

def perform
  execution_type_groups.map do |execution_type_group|
    {
      execution_type: execution_type_group[0],
      usage_percent: SlotsUsagePercentage.new(execution_type_group[1]).perform
    }
  end
end