Commit d6ed7312 authored by Peter Lieven's avatar Peter Lieven Committed by Juan Quintela

migration: show average throughput when migration finishes

currently the value of the throughput field contains whatever
was the last calculated throughput shortly before the migration

This patch updates the post migration contents of the field to
the average throughput.
Signed-off-by: default avatarPeter Lieven <>
Reviewed-by: default avatarPaolo Bonzini <>
Reviewed-by: default avatarJuan Quintela <>
Signed-by: default avatarJuan Quintela <>
Signed-off-by: default avatarJuan Quintela <>
parent 35d08458
......@@ -662,8 +662,13 @@ static void *migration_thread(void *opaque)
if (s->state == MIG_STATE_COMPLETED) {
int64_t end_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
uint64_t transferred_bytes = qemu_ftell(s->file);
s->total_time = end_time - s->total_time;
s->downtime = end_time - start_time;
if (s->total_time) {
s->mbps = (((double) transferred_bytes * 8.0) /
((double) s->total_time)) / 1000;
} else {
if (old_vm_running) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment