From: Ondrej Lichtner olichtne@redhat.com
Hi all,
this patch set introduces another subpackage to the lnst.RecipeCommon.Perf package called Evaluators. This package will be used to implement classes that implement evaluation logic over results generated by the various Perf.Measurements.
For now I implemented just a basic NonZero evaluation for flow measurements and a Baseline evaluation for CPU and Flow measurements.
The baseline evaluators however don't implement any logic on how to actually retrieve the baselines to compare against. For our use-case within RH we'll be using a database that stores these results and so we'll have some lnst extension code that connects to this database and looks for the correct data to use as a baseline. Since the specific database application isn't upstream (yet?), I won't include that code in the upstream lnst repository either so it doesn't confuse others.
-Ondrej
Ondrej Lichtner (12): RecipeCommon.Perf.Recipe: add support for registering evaluators RecipeCommon.Perf.Recipe: order results RecipeCommon.Perf.Recipe: remove unused variable lnst.Controller.Host: fix namespace property lnst.Devices.Device: don't raise exception when coalescing unsupported lnst.Controller.Namespace: add hostname property lnst.RecipeCommon.Perf.Measurements: add BaseMeasurementResults class lnst.RecipeCommon.Perf.Measurements: add name and version properties add lnst.RecipeCommon.Perf.Evaluators package lnst.Recipes.ENRT.BaseEnrtRecipe: register measurement evaluators lnst.Recipes.ENRT.BaseEnrtRecipe: remove unused code gitignore: add build/ directory that contains localy byte-compiled code
.gitignore | 1 + lnst/Controller/Host.py | 2 +- lnst/Controller/Namespace.py | 4 ++ lnst/Devices/Device.py | 5 +- .../Perf/Evaluators/BaseEvaluator.py | 3 + .../Evaluators/BaselineCPUAverageEvaluator.py | 36 +++++++++++ .../BaselineFlowAverageEvaluator.py | 57 +++++++++++++++++ .../Perf/Evaluators/EvaluationError.py | 4 ++ .../Perf/Evaluators/NonzeroFlowEvaluator.py | 26 ++++++++ lnst/RecipeCommon/Perf/Evaluators/__init__.py | 4 ++ .../Perf/Measurements/BaseCPUMeasurement.py | 31 +++------- .../Perf/Measurements/BaseFlowMeasurement.py | 24 +++---- .../Perf/Measurements/BaseMeasurement.py | 22 +++++-- .../Perf/Measurements/IperfFlowMeasurement.py | 29 ++++++++- .../Perf/Measurements/StatCPUMeasurement.py | 6 +- .../Perf/Measurements/TRexFlowMeasurement.py | 2 +- lnst/RecipeCommon/Perf/Recipe.py | 28 ++++++++- lnst/Recipes/ENRT/BaseEnrtRecipe.py | 62 +++++++++++-------- 18 files changed, 272 insertions(+), 74 deletions(-) create mode 100644 lnst/RecipeCommon/Perf/Evaluators/BaseEvaluator.py create mode 100644 lnst/RecipeCommon/Perf/Evaluators/BaselineCPUAverageEvaluator.py create mode 100644 lnst/RecipeCommon/Perf/Evaluators/BaselineFlowAverageEvaluator.py create mode 100644 lnst/RecipeCommon/Perf/Evaluators/EvaluationError.py create mode 100644 lnst/RecipeCommon/Perf/Evaluators/NonzeroFlowEvaluator.py create mode 100644 lnst/RecipeCommon/Perf/Evaluators/__init__.py