From patchwork Wed Oct 7 06:20:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Denis V. Lunev" X-Patchwork-Id: 527154 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 530D2140D95 for ; Wed, 7 Oct 2015 17:25:37 +1100 (AEDT) Received: from localhost ([::1]:55471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjiAR-0001ly-Ae for incoming@patchwork.ozlabs.org; Wed, 07 Oct 2015 02:25:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zji65-0002lM-Sn for qemu-devel@nongnu.org; Wed, 07 Oct 2015 02:21:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zji62-0000Rq-8D for qemu-devel@nongnu.org; Wed, 07 Oct 2015 02:21:05 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:14248 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zji61-0000Rc-TN for qemu-devel@nongnu.org; Wed, 07 Oct 2015 02:21:02 -0400 Received: from irbis.sw.ru ([10.30.2.139]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id t976KkkX031932; Wed, 7 Oct 2015 09:21:00 +0300 (MSK) From: "Denis V. Lunev" To: Date: Wed, 7 Oct 2015 09:20:46 +0300 Message-Id: <1444198846-5383-9-git-send-email-den@openvz.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1444198846-5383-1-git-send-email-den@openvz.org> References: <5614531B.5080107@redhat.com> <1444198846-5383-1-git-send-email-den@openvz.org> X-detected-operating-system: by eggs.gnu.org: OpenBSD 3.x X-Received-From: 195.214.232.25 Cc: "Denis V. Lunev" , Igor Redko , jsnow@redhat.com, qemu-devel@nongnu.org, annam@virtuozzo.com Subject: [Qemu-devel] [PATCH 8/8] migration: add output of gathered statistics X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Igor Redko In this patch the output of the test results was added. If the test was successfully completed, it would be displayed in info migrate. Signed-off-by: Igor Redko Reviewed-by: Anna Melekhova Signed-off-by: Denis V. Lunev --- migration/migration.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index 3470d39..b1c5162 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -454,6 +454,24 @@ MigrationInfo *qmp_query_migrate(Error **errp) get_xbzrle_cache_stats(info); break; + case MIGRATION_STATUS_TEST_COMPLETED: + info->has_status = true; + + info->has_ram = true; + info->ram = g_malloc0(sizeof(*info->ram)); + info->ram->total = ram_bytes_total(); + info->ram->dirty_pages_rate = s->dirty_bytes_rate; + info->ram->mbps = s->mbps; + info->ram->dirty_sync_count = s->dirty_sync_count; + + if (blk_mig_active()) { + info->has_disk = true; + info->disk = g_malloc0(sizeof(*info->disk)); + info->disk->transferred = blk_mig_bytes_transferred(); + info->disk->remaining = blk_mig_bytes_remaining(); + info->disk->total = blk_mig_bytes_total(); + } + break; case MIGRATION_STATUS_COMPLETED: get_xbzrle_cache_stats(info);