aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark')
-rw-r--r--yardstick/benchmark/scenarios/compute/qemu_migrate_benchmark.bash25
-rw-r--r--yardstick/benchmark/scenarios/networking/iperf3.py20
2 files changed, 32 insertions, 13 deletions
diff --git a/yardstick/benchmark/scenarios/compute/qemu_migrate_benchmark.bash b/yardstick/benchmark/scenarios/compute/qemu_migrate_benchmark.bash
index d9a440c89..757553e8b 100644
--- a/yardstick/benchmark/scenarios/compute/qemu_migrate_benchmark.bash
+++ b/yardstick/benchmark/scenarios/compute/qemu_migrate_benchmark.bash
@@ -21,15 +21,24 @@ max_down_time=$6
OUTPUT_FILE=/tmp/output-qemu.log
+echo "To check the parameters:"
+echo "SRC: $src"
+echo "DST: $dst"
+echo "DST_IP: $dst_ip"
+echo "MIGRATE_PORT: $migrate_to_port"
+echo "DOWN_TIME: $max_down_time"
+
do_migrate()
{
+ echo "Execution of Live Migration"
+
echo "info status" | nc -U $src
# with no speed limit
- echo "migrate_set_speed 0" |nc -U $src
+ echo "migrate_set_speed 0" | nc -U $src
# set the expected max downtime
- echo "migrate_set_downtime ${max_down_time}" |nc -U $src
+ echo "migrate_set_downtime ${max_down_time}" | nc -U $src
# start live migration
- echo "migrate -d tcp:${dst_ip}:$migrate_to_port" |nc -U $src
+ echo "migrate -d tcp:${dst_ip}:${migrate_to_port}" | nc -U $src
# wait until live migration completed
status=""
while [ "${status}" == "" ]
@@ -38,14 +47,17 @@ do_migrate()
echo ${status}
sleep 1;
done
-} >/dev/null
+
+ echo "End of Live Migration"
+}
output_qemu()
{
+ echo "Checking status of Migration"
# print detail information
echo "info migrate" | nc -U $src
echo "quit" | nc -U $src
- echo "quit" | nc -u $dst
+ echo "quit" | nc -U $dst
sleep 5
echo "Migration executed successfully"
@@ -65,8 +77,11 @@ echo -e "{ \
# main entry
main()
{
+ echo "Perform LiveMigration"
do_migrate
+ echo "LiveMigration Status"
output_qemu
+ echo "LiveMigration JSON output "
output_json
}
main
diff --git a/yardstick/benchmark/scenarios/networking/iperf3.py b/yardstick/benchmark/scenarios/networking/iperf3.py
index a3d273750..98c45990e 100644
--- a/yardstick/benchmark/scenarios/networking/iperf3.py
+++ b/yardstick/benchmark/scenarios/networking/iperf3.py
@@ -111,18 +111,22 @@ For more info see http://software.es.net/iperf
# If there are no options specified
if not options:
- options = ""
+ options = {}
use_UDP = False
- if "udp" in options:
- cmd += " --udp"
- use_UDP = True
- if "bandwidth" in options:
- cmd += " --bandwidth %s" % options["bandwidth"]
- else:
- # tcp obviously
+ try:
+ protocol = options.get("protocol")
+ bandwidth = options.get('bandwidth')
+ use_UDP = protocol == 'udp'
+ if protocol:
+ cmd += " --" + protocol
+ if use_UDP and bandwidth:
+ cmd += " --bandwidth " + bandwidth
+ # if nodelay in the option, protocal maybe null or 'tcp'
if "nodelay" in options:
cmd += " --nodelay"
+ except AttributeError:
+ LOG.warning("Can't parser the options in your config file!!!")
# these options are mutually exclusive in iperf3
if time: