selector.tournament_monitor

In this module the tournament monitor is defined.

Classes

Monitor(sleep_time, cache, scenario)

Monitor whether the live total runtime of a running conf is exceeding the accumulated runtime of the worst finisher, given that we have already enough finisher.

class selector.tournament_monitor.Monitor(sleep_time, cache, scenario)[source]

Bases: object

Monitor whether the live total runtime of a running conf is exceeding the accumulated runtime of the worst finisher, given that we have already enough finisher. While up the monitor may kill multiple conf/instance pairs. To avoid killing a ta run twice, the monitor stores what it has already killed.

Parameters:
monitor()[source]

Monitors a tournament and terminates a configuration/instance pair if necessary.

termination_check(conf_id, instance, termination_history)[source]

Check if we have killed a conf/instance pair already. Return True if we did not.

Parameters:
  • conf_id (uuid.UUID) – ID of the configuration to be checked.

  • instance (str) – Name of instance to be checked.

  • termination_history (dict) – Record of configuration/instance terminations.

Returns:

False if configuration/instance pair killed, True else.

Return type:

bool