From 69ff3451231a2744ee2ab2f80ba0c4dc23e53f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20d=27Az=C3=A9mar?= Date: Mon, 15 Jul 2019 17:05:59 +0200 Subject: [PATCH 1/4] style: remove unused comment --- rapl_formula/__main__.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/rapl_formula/__main__.py b/rapl_formula/__main__.py index ecba1ee..e2884b8 100644 --- a/rapl_formula/__main__.py +++ b/rapl_formula/__main__.py @@ -52,8 +52,6 @@ class BadActorInitializationError(Exception): def launch_powerapi(config, logger): - ########################################################################## - # Actor Creation # Pusher pushers = generate_pushers(config) @@ -75,9 +73,6 @@ def launch_powerapi(config, logger): report_filter.filter(lambda msg: True, dispatcher) pullers = generate_pullers(config, report_filter) - ########################################################################## - # Actor start step - # Setup signal handler def term_handler(_, __): for _, puller in pullers.items(): @@ -110,14 +105,9 @@ def term_handler(_, __): logger.error('Actor initialisation error, reason : ' + exn.message) supervisor.kill_actors() - ########################################################################## - # Actor run step - # wait supervisor.join() - ########################################################################## - def main(args=None): """ From de06bf288e5a6b7c6263ff61e1350d5b325abdde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20d=27Az=C3=A9mar?= Date: Mon, 15 Jul 2019 17:07:28 +0200 Subject: [PATCH 2/4] refactor: use FormulaPoisonPillMessageHandler to handle PoisonPillMessage --- rapl_formula/rapl_formula_actor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rapl_formula/rapl_formula_actor.py b/rapl_formula/rapl_formula_actor.py index 8e8277e..bc31148 100644 --- a/rapl_formula/rapl_formula_actor.py +++ b/rapl_formula/rapl_formula_actor.py @@ -34,7 +34,7 @@ from functools import reduce from powerapi.actor import Actor, SocketInterface -from powerapi.formula import FormulaActor, FormulaState +from powerapi.formula import FormulaActor, FormulaState, FormulaPoisonPillMessageHandler from powerapi.handler import PoisonPillMessageHandler from powerapi.message import PoisonPillMessage from powerapi.report import HWPCReport @@ -81,5 +81,5 @@ def setup(self): Setup the RAPL formula. """ FormulaActor.setup(self) - self.add_handler(PoisonPillMessage, PoisonPillMessageHandler(self.state)) + self.add_handler(PoisonPillMessage, FormulaPoisonPillMessageHandler(self.state)) self.add_handler(HWPCReport, RAPLHandler(self.state)) From 9f371dcd747bf9e1c0da9494899979ba70f3ff54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20d=27Az=C3=A9mar?= Date: Mon, 15 Jul 2019 17:08:02 +0200 Subject: [PATCH 3/4] refactor: remove unused import --- rapl_formula/__init__.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/rapl_formula/__init__.py b/rapl_formula/__init__.py index cdff7fb..2434916 100644 --- a/rapl_formula/__init__.py +++ b/rapl_formula/__init__.py @@ -28,7 +28,5 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ -from rapl_formula.rapl_formula_actor import RAPLFormulaActor -from rapl_formula.rapl_handlers import RAPLHandler __version__ = "0.3.0" From 1b8642afe38856afe4157c56fef45ec807932cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20d=27Az=C3=A9mar?= Date: Mon, 15 Jul 2019 17:09:38 +0200 Subject: [PATCH 4/4] build: Update version to 0.4.0 and need PowerAPI 0.6.1 --- Dockerfile | 2 +- rapl_formula/__init__.py | 2 +- setup.cfg | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 17d096e..896e5f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM powerapi/powerapi:0.4.0 +FROM powerapi/powerapi:0.6.1 WORKDIR /opt/rapl_formula USER powerapi diff --git a/rapl_formula/__init__.py b/rapl_formula/__init__.py index 2434916..1c66d89 100644 --- a/rapl_formula/__init__.py +++ b/rapl_formula/__init__.py @@ -29,4 +29,4 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ -__version__ = "0.3.0" +__version__ = "0.4.0" diff --git a/setup.cfg b/setup.cfg index cf769d8..dde4008 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,7 +12,6 @@ license = BSD 3-Clause License classifiers = Programming Language :: Python :: 3.7 License :: OSI Approved :: BSD License - # Framework :: PowerAPI [options] zip_safe = False @@ -23,7 +22,7 @@ test_suite = tests setup_requires = pytest-runner >=3.9.2 install_requires = - powerapi >= 0.4.0 + powerapi >= 0.6.1 tests_require = pytest >=3.9.2 mock >=2.0