#!/usr/bin/env python
+
+###############################################################################
#
# NEPI, a framework to manage network experiments
# Copyright (C) 2013 INRIA
#
# Authors: Alina Quereilhac <alina.quereilhac@inria.fr>
# Julien Tribino <julien.tribino@inria.fr>
+#
+###############################################################################
# Topology
#
# - t2 (t1 + 10s) : Ping stop
# - t3 (t2 + 2s) : Kill the application
#
-#
from nepi.execution.ec import ExperimentController
from nepi.execution.resource import ResourceAction, ResourceState
:param compute_metric_callback: function to invoke after each
experiment run, to compute an experiment metric.
It will be invoked with the ec and the run count as arguments,
- and it must return a numeric value for the computed metric:
+ and it must return the metric value(s) computed for the run
metric = compute_metric_callback(ec, run)
collected metric samples have converged and the experiment runner
can stop. It will be invoked with the ec, the run count and the
list of collected metric samples as argument, and it must return
- either True or False:
+ either True or False
stop = evaluate_convergence_callback(ec, run, metrics)
if len(samples) == 0:
msg = "0 samples collected"
raise RuntimeError, msg
-
+
x = numpy.array(samples)
n = len(samples)
std = x.std()
return ec
-
(out, err), proc = self.node.kill(self.pid, self.ppid,
sudo = self._sudo_kill)
+ """
# TODO: check if execution errors occurred
if (proc and proc.poll()) or err:
msg = " Failed to STOP command '%s' " % self.get("command")
self.error(msg, out, err)
-
+ """
+
super(LinuxApplication, self).do_stop()
def do_release(self):