summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@gmail.com>2024-11-11 15:26:51 +0100
committerLuc Provoost <luc.provoost@gmail.com>2024-11-11 15:26:51 +0100
commitc4b140c5f2931c248687a76c700c5f7def3b9025 (patch)
tree5488e7d473f46844c442ce7db6e92eefa4db39f6
parent83ca566aab6c56041eb575de11969d3eb535b542 (diff)
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 <luc.provoost@gmail.com> Change-Id: Ic33881326f9318f1669fdef69a872596cc8e6dbc
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py4
1 files changed, 4 insertions, 0 deletions
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()