From aecbfe9c64a6005f57b2132eb29db2ba7c0993fe Mon Sep 17 00:00:00 2001 From: Xiao Guangrong Date: Fri, 11 Jan 2019 14:37:30 +0800 Subject: migration: introduce pages-per-second It introduces a new statistic, pages-per-second, as bandwidth or mbps is not enough to measure the performance of posting pages out as we have compression, xbzrle, which can significantly reduce the amount of the data size, instead, pages-per-second is the one we want Signed-off-by: Xiao Guangrong Message-Id: <20190111063732.10484-2-xiaoguangrong@tencent.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert With typo's Eric spotted fixed --- migration/ram.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'migration/ram.c') diff --git a/migration/ram.c b/migration/ram.c index 43c2b44..59191c1 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1601,6 +1601,12 @@ uint64_t ram_pagesize_summary(void) return summary; } +uint64_t ram_get_total_transferred_pages(void) +{ + return ram_counters.normal + ram_counters.duplicate + + compression_counters.pages + xbzrle_counters.pages; +} + static void migration_update_rates(RAMState *rs, int64_t end_time) { uint64_t page_count = rs->target_page_count - rs->target_page_count_prev; -- cgit v1.1