aboutsummaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@tencent.com>2018-09-06 15:01:00 +0800
committerDr. David Alan Gilbert <dgilbert@redhat.com>2018-09-26 12:27:27 +0100
commit76e030004f7fbabc2f978e8cd44052e17abd55b2 (patch)
treea082f6700d63b14e26cdba005e42f06640dff2b5 /hmp.c
parent48df9d8002914137b0a1e5c4ca4d402224f205f9 (diff)
downloadqemu-76e030004f7fbabc2f978e8cd44052e17abd55b2.zip
qemu-76e030004f7fbabc2f978e8cd44052e17abd55b2.tar.gz
qemu-76e030004f7fbabc2f978e8cd44052e17abd55b2.tar.bz2
migration: show the statistics of compression
Currently, it includes: pages: amount of pages compressed and transferred to the target VM busy: amount of count that no free thread to compress data busy-rate: rate of thread busy compressed-size: amount of bytes after compression compression-rate: rate of compressed size Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Xiao Guangrong <xiaoguangrong@tencent.com> Message-Id: <20180906070101.27280-3-xiaoguangrong@tencent.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/hmp.c b/hmp.c
index 3a9f797..61ef120 100644
--- a/hmp.c
+++ b/hmp.c
@@ -271,6 +271,19 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict)
info->xbzrle_cache->overflow);
}
+ if (info->has_compression) {
+ monitor_printf(mon, "compression pages: %" PRIu64 " pages\n",
+ info->compression->pages);
+ monitor_printf(mon, "compression busy: %" PRIu64 "\n",
+ info->compression->busy);
+ monitor_printf(mon, "compression busy rate: %0.2f\n",
+ info->compression->busy_rate);
+ monitor_printf(mon, "compressed size: %" PRIu64 "\n",
+ info->compression->compressed_size);
+ monitor_printf(mon, "compression rate: %0.2f\n",
+ info->compression->compression_rate);
+ }
+
if (info->has_cpu_throttle_percentage) {
monitor_printf(mon, "cpu throttle percentage: %" PRIu64 "\n",
info->cpu_throttle_percentage);