Unless the get_ping_evaluators() method is overriden, the default Ping
evaluator will be set to RatePingEvaluator with the minimum ping rate of 50%.
v2:
I moved the registration of default Ping evaluator to separate
class method because individual classes may need specific evaluators
for specific Ping configurations.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Recipes/ENRT/BaseEnrtRecipe.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lnst/Recipes/ENRT/BaseEnrtRecipe.py b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
index d5d52bb9..84d192ee 100644
--- a/lnst/Recipes/ENRT/BaseEnrtRecipe.py
+++ b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
@@ -14,6 +14,7 @@ from lnst.RecipeCommon.Perf.Measurements import Flow as PerfFlow
from lnst.RecipeCommon.Perf.Measurements import IperfFlowMeasurement
from lnst.RecipeCommon.Perf.Measurements import StatCPUMeasurement
from lnst.RecipeCommon.Perf.Evaluators import NonzeroFlowEvaluator
+from lnst.RecipeCommon.Ping.Evaluators import RatePingEvaluator
class EnrtConfiguration(object):
pass
@@ -133,6 +134,9 @@ class BaseEnrtRecipe(BaseSubConfigMixin, PingTestAndEvaluate,
PerfRecipe):
size = self.params.ping_psize,
)
+ ping_evaluators = self.get_ping_evaluators(pconf)
+ pconf.register_evaluators(ping_evaluators)
+
ping_conf_list.append(pconf)
if self.params.ping_bidirect:
@@ -146,6 +150,9 @@ class BaseEnrtRecipe(BaseSubConfigMixin, PingTestAndEvaluate,
PerfRecipe):
def generate_ping_endpoints(self, config):
return []
+ def get_ping_evaluators(self, pconf):
+ return [RatePingEvaluator(min_rate=50)]
+
def generate_perf_configurations(self, config):
for flows in self.generate_flow_combinations(config):
perf_recipe_conf=dict(
--
2.21.1