Class: Binpacker::Scheduler

Inherits:
Object
  • Object
show all
Defined in:
lib/binpacker/scheduler.rb

Direct Known Subclasses

LptScheduler

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.for(strategy) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/binpacker/scheduler.rb', line 10

def self.for(strategy)
  case strategy.to_s
  when "lpt" then LptScheduler.new
  else
    raise SchedulerError, "unknown scheduling algorithm: #{strategy}"
  end
end

Instance Method Details

#partition(tests:, worker_count:, timings:) ⇒ Object

Returns Array<WorkerQueue> one per worker.

Raises:

  • (NotImplementedError)


6
7
8
# File 'lib/binpacker/scheduler.rb', line 6

def partition(tests:, worker_count:, timings:)
  raise NotImplementedError
end