module Settings::RuntimesHelper
def all_runtimes
Runtime.all
end
def all_runtimes_options
all_runtimes.map { |r| [r.name, r.id.to_s] }
end
def all_dates_when_performed(runtimeOrRuntimes)
if runtimeOrRuntimes.kind_of?(BenchmarkConfiguration)
runtimeOrRuntimes.all_dates_when_performed
elsif runtimeOrRuntimes.kind_of?(Enumerable) || runtimeOrRuntimes.kind_of?(ActiveRecord::Relation)
SortedSet.new(runtimeOrRuntimes.map(&:all_dates_when_performed).flatten).to_a
else
raise "Unexpected argument type: #{runtimeOrRuntimes.class}"
end
end
end