Commit 3f15f39d authored by Swann Perarnau's avatar Swann Perarnau

Merge branch 'testing-fixes' into 'master'

Testing fixes

See merge request !13
parents ee5b31e0 3dc8ccbe
......@@ -4,7 +4,7 @@ source:
$(PYTHON) setup.py sdist
install:
$(PYTHON) setup.py install --force --prefix /g/g91/ramesh2/ARGO/NRM
$(PYTHON) setup.py install --force
check:
tox
......@@ -45,8 +45,8 @@ class ContainerManager(object):
# build context to execute
environ = os.environ
environ['PATH'] = ("/usr/local/sbin:"
"/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
# environ['PATH'] = ("/usr/local/sbin:"
# "/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
environ['AC_APP_NAME'] = manifest.name
environ['AC_METADATA_URL'] = "localhost"
logger.info("run: environ: %r", environ)
......
......@@ -65,16 +65,16 @@ class PowerActuator(object):
logger.info("power limits: %r:", pl)
if target == 'i':
for k in pl:
r = range(int(pl[k]['curW']), int(pl[k]['maxW']))
r = range(int(pl[k]['curW'])+1, int(pl[k]['maxW']))
actions.extend([Action(k, s, s - r[0]) for s in r])
elif target == 'd':
for k in pl:
r = range(0, int(pl[k]['curW']))
actions.extend([Action(k, s, s - r[-1]) for s in r])
r = range(1, int(pl[k]['curW']))
actions.extend([Action(k, s, r[-1] - s) for s in r])
return actions
def execute(self, action):
logger.info("changing power limit: %r", action)
logger.info("changing power limit: %r, %r", action.command, action.delta)
self.sensor_manager.set_powerlimit(action.target, action.command)
def update(self, action):
......@@ -105,7 +105,7 @@ class Controller(object):
if actions:
# TODO: better choice
actions.sort(key=lambda x: x[0].delta)
return actions.pop()
return actions.pop(0)
else:
return (None, None)
......
......@@ -19,7 +19,7 @@ logger = logging.getLogger('nrm')
class Daemon(object):
def __init__(self):
self.target = 1.0
self.target = 100.0
def do_downstream_receive(self, parts):
logger.info("receiving downstream message: %r", parts)
......
......@@ -21,5 +21,5 @@ setup(
packages=find_packages(),
install_requires=['six', 'pyzmq', 'tornado', 'numpy'],
scripts=['bin/daemon', 'bin/client']
scripts=['bin/daemon', 'bin/app', 'bin/cmd', 'bin/argo-perf-wrapper']
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment