[PATCH] Revert
"RecipeCommon.Perf.Evaluators.BaselineFlowAverageEvaluator: override
group_results"
by Jan Tluka
This reverts commit 0271ddd201033346938ab8dc98d6cf1610e7a2d5.
It turned out that this patch is not required. If a user needs to
evaluate the aggregated flows a new evaluator class should be created
and added to the evaluators list. The aggregation of the data then
should be called from within this new evaluator class.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
.../Perf/Evaluators/BaselineFlowAverageEvaluator.py | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/lnst/RecipeCommon/Perf/Evaluators/BaselineFlowAverageEvaluator.py b/lnst/RecipeCommon/Perf/Evaluators/BaselineFlowAverageEvaluator.py
index 26b6f740..5d2c014d 100644
--- a/lnst/RecipeCommon/Perf/Evaluators/BaselineFlowAverageEvaluator.py
+++ b/lnst/RecipeCommon/Perf/Evaluators/BaselineFlowAverageEvaluator.py
@@ -30,16 +30,6 @@ class BaselineFlowAverageEvaluator(BaselineEvaluator):
"receiver_cpu_stats",
]
- def group_results(
- self,
- recipe: BaseRecipe,
- recipe_conf: PerfRecipeConf,
- results: List[PerfMeasurementResults],
- ) -> List[List[PerfMeasurementResults]]:
- new_results = results[0].measurement.aggregate_multi_flow_results(results)
-
- return [new_results]
-
def describe_group_results(
self,
recipe: BaseRecipe,
--
2.26.2
2 years, 9 months
[PATCH 1/4] Tests.PacketAssert: fix stderr handling
by olichtne@redhat.com
From: Ondrej Lichtner <olichtne(a)redhat.com>
Tcpdump always prints information to stderr, the "ignore_exprs" regex
detection of "real" errors vs debug information is insufficient due to
this potentially changing at any point from tcpdump. An example of that
is that on RHEL8 we now also see the following line:
dropped privs to tcpdump
Adjusted the PacketAssert module to only report PASS/FAIL based on the
return code of tcpdump (if not 0 then there's some issue). Text in
stderr should also always be debug logged, just in case it could be
useful later.
I also adjusted how the process is "finished" after an interrupt is
received so that the returncode is filled in properly (after the
communicate call).
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Tests/PacketAssert.py | 39 ++++++++++----------------------------
1 file changed, 10 insertions(+), 29 deletions(-)
diff --git a/lnst/Tests/PacketAssert.py b/lnst/Tests/PacketAssert.py
index 25a92ba0..75396101 100644
--- a/lnst/Tests/PacketAssert.py
+++ b/lnst/Tests/PacketAssert.py
@@ -37,25 +37,6 @@ def _check_line(self, line):
return
self._p_recv += 1
- def _is_real_err(self, err):
-
- ignore_exprs = [r"tcpdump: verbose output suppressed, use -v or -vv for full protocol decode",
- r"listening on %s, link-type .* \(.*\), capture size [0-9]* bytes" %
- self.params.interface.name, r"\d+ packets captured",
- r"\d+ packets received by filter", r"\d+ packets dropped by kernel"]
-
- for line in err.split('\n'):
- if not line:
- continue
- match = False
- for expr in ignore_exprs:
- if re.search(expr, line):
- match = True
- break
- if not match:
- return True
- return False
-
def run(self):
self._res_data = {}
if not is_installed("tcpdump"):
@@ -75,17 +56,14 @@ def run(self):
except:
raise LnstError("Could not handle interrupt properly.")
- with packet_assert_process.stdout, packet_assert_process.stderr:
- stderr=packet_assert_process.stderr.read().decode()
- stdout=packet_assert_process.stdout.read().decode()
+ stdout, stderr = packet_assert_process.communicate()
+ stdout = stdout.decode()
+ stderr = stderr.decode()
self._res_data["stderr"] = stderr
-
- if self._is_real_err(stderr):
- self._res_data["msg"] = "errors reported by tcpdump"
- logging.error(self._res_data["msg"])
- logging.error(self._res_data["stderr"])
- return False
+ # tcpdump always reports information to stderr, there may be actual
+ # errors but also just generic debug information
+ logging.debug(self._res_data["stderr"])
for line in stdout.split("\n"):
self._check_line(line)
@@ -93,4 +71,7 @@ def run(self):
logging.debug("Capturing finised. Received %d packets." % self._p_recv)
self._res_data["p_recv"] = self._p_recv
- return True
+ if packet_assert_process.returncode != 0:
+ return False
+ else:
+ return True
--
2.30.1
2 years, 9 months
[PATCH v3 00/14] Enable parallel iperf testing
by Jan Tluka
This patchset is another attempt to implement parallel iperf testing.
In comparison to the first RFC the changes are less intrusive and reuses
the original Flow concept.
Motivation:
The current parallel implementation that can be achieved by specifying
the perf_parallel_streams recipe parameter works correctly however the
limitation is that there's only one iperf process that creates multiple
connections and that process (and all the connections) can be handled by
a single CPU at the same time. In our internal testing this proved to
report very variable CPU utilization numbers.
This patchset extends the IperfFlowMeasurementGenerator with additional
recipe parameters:
* perf_parallel_processes
* perf_tool_cpu_policy
Additionaly some of the parameters were modified to support parallelism:
* perf_tool_cpu is now a ListParam
* dev_intr_cpu is now a ListParam
The patch set includes also update of DevInterruptHWConfigMixin that is
required for this test scenario to provide reproducible results.
v2:
- made aggregate_multi_flow_results a @staticmethod of
BaseFlowMeasurement class
- fixed minor issue with perf_tool_cpu_policy parameter handling
- removed unused import of PerfFlow in SimpleMacsecRecipe
Jan Tluka (14):
RecipeCommon.Perf.BaseFlowMeasurement.Flow: make some arguments
optional
RecipeCommon.Perf.Measurements.BaseFlowMeasurement.Flow: add
receiver_port
RecipeCommon.Perf.Measurements.IperfFlowMeasurement: configure
receiver_port
Recipes.ENRT.MeasurementGenerators.IperfMeasurementGenerator: adapt to
Flow port changes
Recipes.ENRT.ConfigMixins.Reversible: adapt to Flow port changes
Recipes.ENRT.MeasurementGenerators.IperfMeasurementGenerator: add
_create_perf_flows
Recipes.ENRT.MeasurementGenerators.IperfMeasurementGenerator: add
perf_parallel_processes parameter
IperfMeasurementGenerator: adjust cpu parameters for parallel iperf
support
RecipeCommon.Perf.Measurements.IperfFlowMeasurement: adjust cpupin for
both server and client
RecipeCommon.Perf.Measurements.BaseFlowMeasurement: add
aggregate_multi_flow_results()
RecipeCommon.Perf.Evaluators.BaselineFlowAverageEvaluator: override
group_results
RecipeCommon.Perf.Measurements.BaseFlowMeasurement: report also
aggregated results
Recipes.ENRT.ConfigMixins.DevInterruptHWConfigMixin: change
dev_intr_cpu to ListParam
Recipes.ENRT.SimpleMacsecRecipe: remove unused import
.../BaselineFlowAverageEvaluator.py | 10 +++
.../Perf/Measurements/BaseFlowMeasurement.py | 74 +++++++++++++++-
.../Perf/Measurements/IperfFlowMeasurement.py | 38 ++++----
.../ConfigMixins/DevInterruptHWConfigMixin.py | 26 +++---
.../ConfigMixins/PerfReversibleFlowMixin.py | 34 +++++--
.../IperfMeasurementGenerator.py | 88 +++++++++++++++----
lnst/Recipes/ENRT/SimpleMacsecRecipe.py | 1 -
7 files changed, 217 insertions(+), 54 deletions(-)
--
2.26.2
2 years, 9 months