aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/networking
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark/scenarios/networking')
-rw-r--r--yardstick/benchmark/scenarios/networking/ping6.py12
-rw-r--r--yardstick/benchmark/scenarios/networking/ping6_benchmark.bash3
2 files changed, 13 insertions, 2 deletions
diff --git a/yardstick/benchmark/scenarios/networking/ping6.py b/yardstick/benchmark/scenarios/networking/ping6.py
index e68756462..dc896b2c6 100644
--- a/yardstick/benchmark/scenarios/networking/ping6.py
+++ b/yardstick/benchmark/scenarios/networking/ping6.py
@@ -39,6 +39,7 @@ class Ping6(base.Scenario): # pragma: no cover
self.context_cfg = context_cfg
self.setup_done = False
self.run_done = False
+ self.ping_options = ''
def _pre_setup(self):
for node_name in self.host_list:
@@ -83,6 +84,10 @@ class Ping6(base.Scenario): # pragma: no cover
Ping6.RADVD_SCRIPT)
options = self.scenario_cfg['options']
+ self.ping_options = "-s %s" % \
+ options.get("packetsize", '56') + \
+ "-c %s" % \
+ options.get("ping_count", '5')
host_str = options.get("host", 'host1')
self.host_list = host_str.split(',')
self.host_list.sort()
@@ -126,6 +131,10 @@ class Ping6(base.Scenario): # pragma: no cover
if not self.setup_done:
options = self.scenario_cfg['options']
+ self.ping_options = "-s %s" % \
+ options.get("packetsize", '56') + \
+ "-c %s" % \
+ options.get("ping_count", '5')
host_str = options.get("host", 'host1')
self.host_list = host_str.split(',')
self.host_list.sort()
@@ -149,7 +158,8 @@ class Ping6(base.Scenario): # pragma: no cover
# run ping6 benchmark
self.client.run("cat > ~/ping6.sh",
stdin=open(self.ping6_script, "rb"))
- cmd = "sudo bash ping6.sh"
+ cmd_args = "%s" % (self.ping_options)
+ cmd = "sudo bash ping6.sh %s" % (cmd_args)
LOG.debug("Executing command: %s", cmd)
status, stdout, stderr = self.client.execute(cmd)
diff --git a/yardstick/benchmark/scenarios/networking/ping6_benchmark.bash b/yardstick/benchmark/scenarios/networking/ping6_benchmark.bash
index 16cb0f07e..9a08b098a 100644
--- a/yardstick/benchmark/scenarios/networking/ping6_benchmark.bash
+++ b/yardstick/benchmark/scenarios/networking/ping6_benchmark.bash
@@ -11,6 +11,7 @@
# Run a single ping6 command towards a ipv6 router
set -e
+ping6_options=$1
source /opt/admin-openrc.sh
chmod 600 vRouterKey
# TODO find host
@@ -29,4 +30,4 @@ wait_vm_ok() {
}
wait_vm_ok
sleep 360
-sudo ip netns exec qdhcp-$(neutron net-list | grep -w ipv4-int-network1 | awk '{print $2}') ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i vRouterKey fedora@20.0.0.4 "ping6 -c 1 2001:db8:0:1::1 | grep ttl | awk -F [=\ ] '{printf \$10}'" \ No newline at end of file
+sudo ip netns exec qdhcp-$(neutron net-list | grep -w ipv4-int-network1 | awk '{print $2}') ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i vRouterKey fedora@20.0.0.4 "ping6 $ping6_options 2001:db8:0:1::1 | grep rtt | awk -F [\/\ ] '{printf \$8}'"