aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/benchmark/core
diff options
context:
space:
mode:
authorDanielMartinBuckley <daniel.m.buckley@intel.com>2018-06-06 15:06:01 +0100
committerEmma Foley <emma.l.foley@intel.com>2018-06-28 11:26:39 +0100
commitef3f82fc25f2ef8a77e1e4e518b01b80efcd73fd (patch)
tree4d38c494c925121eba89824fceb4983ea270e6c0 /yardstick/tests/unit/benchmark/core
parenteaebb40c960284d7d4ce9ad6221cba32c04a2827 (diff)
Addition of Configurable Sampling and Configurable Confirmation Retry
JIRA: YARDSTICK-1221 In order to increase accuracy of result the following are done :- - Improve Measurement Accuracy (YARDSTICK-1212) - Improve Sampling Interval (YARDSTICK-1219) - Allow 4 PROX ports to be read simultaneously (YARDSTICK-1220) This change does the following :- - Stores LINE Rate statistics of Sample - Requires a confirmation retry before deciding to increase or decrease this is configurable. - Allows the user to disable Sampling or specify a sample interval - Added Code Coverage of ProxDurationRunner based on YARDSTICK-1199 Change-Id: I27242ac1849c9a2712866385b5fbc05977c71516 Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com> (cherry picked from commit 2e447af9a5a54355aa20028813660d07d1bd2e18)
Diffstat (limited to 'yardstick/tests/unit/benchmark/core')
-rw-r--r--yardstick/tests/unit/benchmark/core/test_task.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/yardstick/tests/unit/benchmark/core/test_task.py b/yardstick/tests/unit/benchmark/core/test_task.py
index 7468368df..0424c77a3 100644
--- a/yardstick/tests/unit/benchmark/core/test_task.py
+++ b/yardstick/tests/unit/benchmark/core/test_task.py
@@ -156,6 +156,31 @@ class TaskTestCase(unittest.TestCase):
t._run([scenario], False, "yardstick.out")
runner.run.assert_called_once()
+ @mock.patch.object(task, 'Context')
+ @mock.patch.object(task, 'base_runner')
+ def test_run_ProxDuration(self, mock_base_runner, *args):
+ scenario = {
+ 'host': 'athena.demo',
+ 'target': 'ares.demo',
+ 'runner': {
+ 'duration': 60,
+ 'interval': 1,
+ 'sampled': 'yes',
+ 'confirmation': 1,
+ 'type': 'ProxDuration'
+ },
+ 'type': 'Ping'
+ }
+
+ t = task.Task()
+ runner = mock.Mock()
+ runner.join.return_value = 0
+ runner.get_output.return_value = {}
+ runner.get_result.return_value = []
+ mock_base_runner.Runner.get.return_value = runner
+ t._run([scenario], False, "yardstick.out")
+ runner.run.assert_called_once()
+
@mock.patch.object(os, 'environ')
def test_check_precondition(self, mock_os_environ):
cfg = {