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 cdff7fb..1c66d89 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" +__version__ = "0.4.0" 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): """ 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)) 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