aboutsummaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2012-08-18 13:17:10 +0200
committerLuiz Capitulino <lcapitulino@redhat.com>2012-08-21 15:06:24 -0300
commit7aa939af39e20eeca98fced59708a87c64267f54 (patch)
treef6d5b1d8087d9e97ad13da4fc5ecaed529703066 /migration.c
parentb2dc64c391843f6499069f0ba77ad0a8c9560c86 (diff)
migration: move total_time from ram stats to migration info
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/migration.c b/migration.c
index 653a3c1a88..1edeec5ddd 100644
--- a/migration.c
+++ b/migration.c
@@ -166,14 +166,15 @@ MigrationInfo *qmp_query_migrate(Error **errp)
case MIG_STATE_ACTIVE:
info->has_status = true;
info->status = g_strdup("active");
+ info->has_total_time = true;
+ info->total_time = qemu_get_clock_ms(rt_clock)
+ - s->total_time;
info->has_ram = true;
info->ram = g_malloc0(sizeof(*info->ram));
info->ram->transferred = ram_bytes_transferred();
info->ram->remaining = ram_bytes_remaining();
info->ram->total = ram_bytes_total();
- info->ram->total_time = qemu_get_clock_ms(rt_clock)
- - s->total_time;
info->ram->duplicate = dup_mig_pages_transferred();
info->ram->normal = norm_mig_pages_transferred();
info->ram->normal_bytes = norm_mig_bytes_transferred();
@@ -193,13 +194,13 @@ MigrationInfo *qmp_query_migrate(Error **errp)
info->has_status = true;
info->status = g_strdup("completed");
+ info->total_time = s->total_time;
info->has_ram = true;
info->ram = g_malloc0(sizeof(*info->ram));
info->ram->transferred = ram_bytes_transferred();
info->ram->remaining = 0;
info->ram->total = ram_bytes_total();
- info->ram->total_time = s->total_time;
info->ram->duplicate = dup_mig_pages_transferred();
info->ram->normal = norm_mig_pages_transferred();
info->ram->normal_bytes = norm_mig_bytes_transferred();