sent a second version of the patchset that removes the first patch and
introduces an extra bugfix into the final patch that I found while
profiling measurements.
I still need to do some more testing with this (to see if the timestamp
rework) fixes all the actual issues that I've seen with the ported
recipes before applying this to upstream.
-Ondrej
On Tue, Jan 26, 2021 at 03:09:15PM +0100, olichtne(a)redhat.com wrote:
From: Ondrej Lichtner <olichtne(a)redhat.com>
The evaluate_results method signature changed in
cd5328db8b0196a6102ebea54bdea1ce632cfe46 and the ping evaluators weren't
updated...
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/RecipeCommon/Ping/Evaluators/RatePingEvaluator.py | 10 +++++++++-
.../Ping/Evaluators/ZeroPassPingEvaluator.py | 10 +++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/lnst/RecipeCommon/Ping/Evaluators/RatePingEvaluator.py
b/lnst/RecipeCommon/Ping/Evaluators/RatePingEvaluator.py
index 6760d32..f2a3dce 100644
--- a/lnst/RecipeCommon/Ping/Evaluators/RatePingEvaluator.py
+++ b/lnst/RecipeCommon/Ping/Evaluators/RatePingEvaluator.py
@@ -1,3 +1,6 @@
+from typing import List, Any
+
+from lnst.Controller.Recipe import BaseRecipe
from lnst.RecipeCommon.BaseResultEvaluator import BaseResultEvaluator
class RatePingEvaluator(BaseResultEvaluator):
@@ -12,7 +15,12 @@ def __init__(self, min_rate=None, max_rate=None, rate=None):
self.__class__.__name__)
)
- def evaluate_results(self, recipe, result):
+ def evaluate_results(
+ self,
+ recipe: BaseRecipe,
+ recipe_conf: Any,
+ result: List[Any],
+ ):
result_status = True
ping_rate = int(result['rate'])
diff --git a/lnst/RecipeCommon/Ping/Evaluators/ZeroPassPingEvaluator.py
b/lnst/RecipeCommon/Ping/Evaluators/ZeroPassPingEvaluator.py
index 350e157..afb3d02 100644
--- a/lnst/RecipeCommon/Ping/Evaluators/ZeroPassPingEvaluator.py
+++ b/lnst/RecipeCommon/Ping/Evaluators/ZeroPassPingEvaluator.py
@@ -1,7 +1,15 @@
+from typing import List, Any
+
+from lnst.Controller.Recipe import BaseRecipe
from lnst.RecipeCommon.BaseResultEvaluator import BaseResultEvaluator
class ZeroPassPingEvaluator(BaseResultEvaluator):
- def evaluate_results(self, recipe, result):
+ def evaluate_results(
+ self,
+ recipe: BaseRecipe,
+ recipe_conf: Any,
+ result: List[Any],
+ ):
result_status = True
trans_packets = int(result['trans_pkts'])
recv_packets = int(result['recv_pkts'])
--
2.30.0