aboutsummaryrefslogtreecommitdiff
path: root/tests/migration/guestperf/engine.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/migration/guestperf/engine.py')
-rw-r--r--tests/migration/guestperf/engine.py150
1 files changed, 75 insertions, 75 deletions
diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestperf/engine.py
index e69d16a62c..da96ca034a 100644
--- a/tests/migration/guestperf/engine.py
+++ b/tests/migration/guestperf/engine.py
@@ -77,7 +77,7 @@ class Engine(object):
return TimingRecord(pid, now, 1000 * (stime + utime) / jiffies_per_sec)
def _migrate_progress(self, vm):
- info = vm.command("query-migrate")
+ info = vm.cmd("query-migrate")
if "ram" not in info:
info["ram"] = {}
@@ -109,7 +109,7 @@ class Engine(object):
src_vcpu_time = []
src_pid = src.get_pid()
- vcpus = src.command("query-cpus-fast")
+ vcpus = src.cmd("query-cpus-fast")
src_threads = []
for vcpu in vcpus:
src_threads.append(vcpu["thread-id"])
@@ -128,82 +128,82 @@ class Engine(object):
if self._verbose:
print("Starting migration")
if scenario._auto_converge:
- resp = src.command("migrate-set-capabilities",
- capabilities = [
- { "capability": "auto-converge",
- "state": True }
- ])
- resp = src.command("migrate-set-parameters",
- cpu_throttle_increment=scenario._auto_converge_step)
+ resp = src.cmd("migrate-set-capabilities",
+ capabilities = [
+ { "capability": "auto-converge",
+ "state": True }
+ ])
+ resp = src.cmd("migrate-set-parameters",
+ cpu_throttle_increment=scenario._auto_converge_step)
if scenario._post_copy:
- resp = src.command("migrate-set-capabilities",
- capabilities = [
- { "capability": "postcopy-ram",
- "state": True }
- ])
- resp = dst.command("migrate-set-capabilities",
- capabilities = [
- { "capability": "postcopy-ram",
- "state": True }
- ])
-
- resp = src.command("migrate-set-parameters",
- max_bandwidth=scenario._bandwidth * 1024 * 1024)
-
- resp = src.command("migrate-set-parameters",
- downtime_limit=scenario._downtime)
+ resp = src.cmd("migrate-set-capabilities",
+ capabilities = [
+ { "capability": "postcopy-ram",
+ "state": True }
+ ])
+ resp = dst.cmd("migrate-set-capabilities",
+ capabilities = [
+ { "capability": "postcopy-ram",
+ "state": True }
+ ])
+
+ resp = src.cmd("migrate-set-parameters",
+ max_bandwidth=scenario._bandwidth * 1024 * 1024)
+
+ resp = src.cmd("migrate-set-parameters",
+ downtime_limit=scenario._downtime)
if scenario._compression_mt:
- resp = src.command("migrate-set-capabilities",
- capabilities = [
- { "capability": "compress",
- "state": True }
- ])
- resp = src.command("migrate-set-parameters",
- compress_threads=scenario._compression_mt_threads)
- resp = dst.command("migrate-set-capabilities",
- capabilities = [
- { "capability": "compress",
- "state": True }
- ])
- resp = dst.command("migrate-set-parameters",
- decompress_threads=scenario._compression_mt_threads)
+ resp = src.cmd("migrate-set-capabilities",
+ capabilities = [
+ { "capability": "compress",
+ "state": True }
+ ])
+ resp = src.cmd("migrate-set-parameters",
+ compress_threads=scenario._compression_mt_threads)
+ resp = dst.cmd("migrate-set-capabilities",
+ capabilities = [
+ { "capability": "compress",
+ "state": True }
+ ])
+ resp = dst.cmd("migrate-set-parameters",
+ decompress_threads=scenario._compression_mt_threads)
if scenario._compression_xbzrle:
- resp = src.command("migrate-set-capabilities",
- capabilities = [
- { "capability": "xbzrle",
- "state": True }
- ])
- resp = dst.command("migrate-set-capabilities",
- capabilities = [
- { "capability": "xbzrle",
- "state": True }
- ])
- resp = src.command("migrate-set-parameters",
- xbzrle_cache_size=(
- hardware._mem *
- 1024 * 1024 * 1024 / 100 *
- scenario._compression_xbzrle_cache))
+ resp = src.cmd("migrate-set-capabilities",
+ capabilities = [
+ { "capability": "xbzrle",
+ "state": True }
+ ])
+ resp = dst.cmd("migrate-set-capabilities",
+ capabilities = [
+ { "capability": "xbzrle",
+ "state": True }
+ ])
+ resp = src.cmd("migrate-set-parameters",
+ xbzrle_cache_size=(
+ hardware._mem *
+ 1024 * 1024 * 1024 / 100 *
+ scenario._compression_xbzrle_cache))
if scenario._multifd:
- resp = src.command("migrate-set-capabilities",
- capabilities = [
- { "capability": "multifd",
- "state": True }
- ])
- resp = src.command("migrate-set-parameters",
- multifd_channels=scenario._multifd_channels)
- resp = dst.command("migrate-set-capabilities",
- capabilities = [
- { "capability": "multifd",
- "state": True }
- ])
- resp = dst.command("migrate-set-parameters",
- multifd_channels=scenario._multifd_channels)
-
- resp = src.command("migrate", uri=connect_uri)
+ resp = src.cmd("migrate-set-capabilities",
+ capabilities = [
+ { "capability": "multifd",
+ "state": True }
+ ])
+ resp = src.cmd("migrate-set-parameters",
+ multifd_channels=scenario._multifd_channels)
+ resp = dst.cmd("migrate-set-capabilities",
+ capabilities = [
+ { "capability": "multifd",
+ "state": True }
+ ])
+ resp = dst.cmd("migrate-set-parameters",
+ multifd_channels=scenario._multifd_channels)
+
+ resp = src.cmd("migrate", uri=connect_uri)
post_copy = False
paused = False
@@ -228,7 +228,7 @@ class Engine(object):
if progress._status in ("completed", "failed", "cancelled"):
if progress._status == "completed" and paused:
- dst.command("cont")
+ dst.cmd("cont")
if progress_history[-1] != progress:
progress_history.append(progress)
@@ -256,13 +256,13 @@ class Engine(object):
if progress._ram._iterations > scenario._max_iters:
if self._verbose:
print("No completion after %d iterations over RAM" % scenario._max_iters)
- src.command("migrate_cancel")
+ src.cmd("migrate_cancel")
continue
if time.time() > (start + scenario._max_time):
if self._verbose:
print("No completion after %d seconds" % scenario._max_time)
- src.command("migrate_cancel")
+ src.cmd("migrate_cancel")
continue
if (scenario._post_copy and
@@ -270,7 +270,7 @@ class Engine(object):
not post_copy):
if self._verbose:
print("Switching to post-copy after %d iterations" % scenario._post_copy_iters)
- resp = src.command("migrate-start-postcopy")
+ resp = src.cmd("migrate-start-postcopy")
post_copy = True
if (scenario._pause and
@@ -278,7 +278,7 @@ class Engine(object):
not paused):
if self._verbose:
print("Pausing VM after %d iterations" % scenario._pause_iters)
- resp = src.command("stop")
+ resp = src.cmd("stop")
paused = True
def _is_ppc64le(self):