From c4b140c5f2931c248687a76c700c5f7def3b9025 Mon Sep 17 00:00:00 2001 From: Luc Provoost Date: Mon, 11 Nov 2024 15:26:51 +0100 Subject: Allow to collect power In order to collect pwoer of the system under test, one can now define a power helper function that will retrieve System, CPU, and RAM power. This function will then be called at the end of a test iteration. The actual function to collect the power is not provided in this github. Signed-off-by: Luc Provoost Change-Id: Ic33881326f9318f1669fdef69a872596cc8e6dbc --- VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py index deba695f..37540b2e 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py @@ -357,6 +357,10 @@ class RapidTest(object): time_loop_data['Size'] = size time_loop_data['RequestedSpeed'] = RapidTest.get_pps(speed, size) _ = self.post_data(time_loop_data) + if 'power_helper' in self.test.keys(): + iteration_data['Sys'],iteration_data['Cpu'],iteration_data['Ram'] = self.test['power_helper'].get_power() + else: + iteration_data['Sys'],iteration_data['Cpu'],iteration_data['Ram'] = 0,0,0 end_bg_gen_stats = [] for bg_gen_machine in self.background_machines: bg_rx, bg_non_dp_rx, bg_tx, bg_non_dp_tx, _, _, bg_tsc, bg_hz = bg_gen_machine.core_stats() -- cgit