From: Ondrej Lichtner <olichtne(a)redhat.com>
This adds a parameter to set a higher maximum retries value for perfrepo
connections. Requires python-perfrepo newer than
2319902b2235dd45b7d2948f201ecba6fd85ea35.
Setting the default value to 3.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/Task.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lnst/Controller/Task.py b/lnst/Controller/Task.py
index 6cbb165..a9a184d 100644
--- a/lnst/Controller/Task.py
+++ b/lnst/Controller/Task.py
@@ -128,7 +128,7 @@ class ControllerAPI(object):
"""
return self._ctl._get_aliases()
- def connect_PerfRepo(self, mapping_file, url=None, username=None, password=None):
+ def connect_PerfRepo(self, mapping_file, url=None, username=None, password=None,
max_retries=3):
if not self._perf_repo_api.connected():
if url is None:
url = lnst_config.get_option("perfrepo", "url")
@@ -144,7 +144,7 @@ class ControllerAPI(object):
if not password:
logging.warn("No PerfRepo password specified in config file")
if url and username and password:
- self._perf_repo_api.connect(url, username, password)
+ self._perf_repo_api.connect(url, username, password, max_retries)
root = Path(None, self._ctl._recipe_path).get_root()
path = Path(root, mapping_file)
@@ -870,9 +870,10 @@ class PerfRepoAPI(object):
else:
return False
- def connect(self, url, username, password):
+ def connect(self, url, username, password, max_retries=0):
if PerfRepoRESTAPI is not None:
self._rest_api = PerfRepoRESTAPI(url, username, password)
+ self._rest_api.set_retries(max_retries)
if not self._rest_api.connected():
self._rest_api = None
else:
--
2.10.0
Show replies by date
From: Ondrej Lichtner <olichtne(a)redhat.com>
Fixes: ea75135c ("Netperf: add option udp_size")
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
test_modules/Netperf.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test_modules/Netperf.py b/test_modules/Netperf.py
index 9f98d23..853c502 100644
--- a/test_modules/Netperf.py
+++ b/test_modules/Netperf.py
@@ -149,7 +149,7 @@ class Netperf(TestGeneric):
if self._is_omni() or self._testoptions:
cmd += " -m %s" % self._udp_size
else:
- cms += " -- -m %s" % self._udp_size
+ cmd += " -- -m %s" % self._udp_size
elif self._role == "server":
--
2.10.0
From: Ondrej Lichtner <olichtne(a)redhat.com>
When measured rate was 0, a division by zero can occur while checking if
the result deviation was too high. This commit fixes the issue, by
automatically rejecting 0 throughput results as FAIL.
Fixes: eca3a19a12 ("Netperf: add option max_deviation")
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
test_modules/Netperf.py | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/test_modules/Netperf.py b/test_modules/Netperf.py
index 853c502..5ab0815 100644
--- a/test_modules/Netperf.py
+++ b/test_modules/Netperf.py
@@ -502,6 +502,16 @@ class Netperf(TestGeneric):
return (False, res_data)
res_val = False
+ res_data["msg"] = "Measured rate was %.2f +-%.2f %s" %\
+ (rate_pretty["rate"],
+ rate_dev_pretty["rate"],
+ rate_pretty["unit"])
+ if rate > 0.0:
+ res_val = True
+ else:
+ res_val = False
+ return (res_val, res_data)
+
if self._max_deviation is not None:
if self._max_deviation["type"] == "percent":
percentual_deviation = (rate_deviation / rate) * 100
@@ -556,15 +566,6 @@ class Netperf(TestGeneric):
threshold_dev_pretty["rate"],
threshold_pretty["unit"])
return (res_val, res_data)
- else:
- if rate > 0.0:
- res_val = True
- else:
- res_val = False
- res_data["msg"] = "Measured rate was %.2f +-%.2f %s" %\
- (rate_pretty["rate"],
- rate_dev_pretty["rate"],
- rate_pretty["unit"])
return (res_val, res_data)
def run(self):
--
2.10.0
Mon, Oct 10, 2016 at 02:16:46PM CEST, olichtne(a)redhat.com wrote:
From: Ondrej Lichtner <olichtne(a)redhat.com>
This adds a parameter to set a higher maximum retries value for perfrepo
connections. Requires python-perfrepo newer than
2319902b2235dd45b7d2948f201ecba6fd85ea35.
Setting the default value to 3.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
Ack to series. I tested the perfrepo patch and also the Netperf zero
throughput patch.
Acked-by: Jan Tluka <jtluka(a)redhat.com>
On Tue, Oct 11, 2016 at 05:34:48PM +0200, Jan Tluka wrote:
Mon, Oct 10, 2016 at 02:16:46PM CEST, olichtne(a)redhat.com wrote:
>From: Ondrej Lichtner <olichtne(a)redhat.com>
>
>This adds a parameter to set a higher maximum retries value for perfrepo
>connections. Requires python-perfrepo newer than
>2319902b2235dd45b7d2948f201ecba6fd85ea35.
>
>Setting the default value to 3.
>
>Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
Ack to series. I tested the perfrepo patch and also the Netperf zero
throughput patch.
Acked-by: Jan Tluka <jtluka(a)redhat.com>
thanks for the ack, pushed
-Ondrej