Added debug logging to the OTF algorithm

This commit is contained in:
Anton Beloglazov 2013-01-25 10:49:21 +11:00
parent 7890097856
commit da8a4ca120

View File

@ -85,6 +85,14 @@ def otf(otf, threshold, limit, migration_time, utilization, state):
if len(utilization) < limit:
decision = False
else:
if log.isEnabledFor(logging.DEBUG):
log.debug('OTF overload steps:' + str(state['overload']))
log.debug('OTF overload steps:' + str(state['total']))
log.debug('OTF:' + str(state['overload'] / state['total']))
log.debug('OTF + migration time:' +
str((migration_time + state['overload']) / \
(migration_time + state['total'])))
decision = (migration_time + state['overload']) / \
(migration_time + state['total']) >= otf