migration: show average throughput when migration finishes
PATCH 1/1 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 finished.
This patch updates the post migration contents of the field to the average throughput.
Signed-off-by Peter Lieven <[email protected]>
migration.c +5 -0
@@ -662,8 +662,13 @@ static void *migration_thread(void *opaque)qemu_mutex_lock_iothread ();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 ; + }runstate_set (RUN_STATE_POSTMIGRATE ); }else {if (old_vm_running) {
Signature · 1 line
1.7.9.5
Il 12/05/2014 10:46, Peter Lieven ha scritto:
Quoted 18 lines
currently the value of the throughput field contains whatever was the last calculated throughput shortly before the migration finished.
This patch updates the post migration contents of the field to the average throughput.
Signed-off-by Peter Lieven <[email protected]>migration.c +0
-0@@ -662,8 +662,13 @@ static void *migration_thread(void *opaque)qemu_mutex_lock_iothread ();if (s->state ==MIG_STATE_COMPLETED ) {int64_t end_time =qemu_clock_get_ms (QEMU_CLOCK_REALTIME );
migration.c static void *migration_thread(void *opaque) · line 674
Quoted 10 lines
migration.c +5
-0+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 ; + }runstate_set (RUN_STATE_POSTMIGRATE ); }else {if (old_vm_running) {
Reviewed-by Paolo Bonzini <[email protected]>