[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v4 10/11] rdma: print out throughput while debugging
From: |
mrhines |
Subject: |
[Qemu-devel] [PULL v4 10/11] rdma: print out throughput while debugging |
Date: |
Wed, 17 Apr 2013 19:07:19 -0400 |
From: "Michael R. Hines" <address@hidden>
It's very helpful when debugging to print out migration throughput
after each iteration round to compare the different migration
technologies.
Signed-off-by: Michael R. Hines <address@hidden>
---
migration.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/migration.c b/migration.c
index 2f33914..6dac831 100644
--- a/migration.c
+++ b/migration.c
@@ -35,6 +35,9 @@
do { } while (0)
#endif
+#define MBPS(bytes, time) (time ? ((((double) bytes * 8) \
+ / ((double) time / 1000.0)) / 1000.0 / 1000.0) : -1.0)
+
enum {
MIG_STATE_ERROR,
MIG_STATE_SETUP,
@@ -564,8 +567,9 @@ static void *migration_thread(void *opaque)
max_size = bandwidth * migrate_max_downtime() / 1000000;
DPRINTF("transferred %" PRIu64 " time_spent %" PRIu64
- " bandwidth %g max_size %" PRId64 "\n",
- transferred_bytes, time_spent, bandwidth, max_size);
+ " bandwidth %g throughput %f max_size %" PRId64 "\n",
+ transferred_bytes, time_spent, bandwidth,
+ MBPS(transferred_bytes, time_spent), max_size);
/* if we haven't sent anything, we don't want to recalculate
10000 is a small enough number for our purposes */
if (s->dirty_bytes_rate && transferred_bytes > 10000) {
--
1.7.10.4
- [Qemu-devel] [PULL v4 00/11] rdma: migration support, mrhines, 2013/04/17
- [Qemu-devel] [PULL v4 02/11] rdma: introduce qemu_ram_foreach_block(), mrhines, 2013/04/17
- [Qemu-devel] [PULL v4 03/11] rdma: introduce qemu_file_mode_is_not_valid(), mrhines, 2013/04/17
- [Qemu-devel] [PULL v4 04/11] rdma: export ram_handle_compressed(), mrhines, 2013/04/17
- [Qemu-devel] [PULL v4 10/11] rdma: print out throughput while debugging,
mrhines <=
- [Qemu-devel] [PULL v4 06/11] rdma: new QEMUFileOps hooks, mrhines, 2013/04/17
- [Qemu-devel] [PULL v4 01/11] rdma: export yield_until_fd_readable(), mrhines, 2013/04/17
- [Qemu-devel] [PULL v4 05/11] rdma: export qemu_fflush(), mrhines, 2013/04/17
- [Qemu-devel] [PULL v4 07/11] rdma: introduce capability for chunk registration, mrhines, 2013/04/17
- Re: [Qemu-devel] [PULL v4 07/11] rdma: introduce capability for chunk registration, Eric Blake, 2013/04/18
- Re: [Qemu-devel] [PULL v4 07/11] rdma: introduce capability for chunk registration, Michael R. Hines, 2013/04/18
- Re: [Qemu-devel] [PULL v4 07/11] rdma: introduce capability for chunk registration, Michael S. Tsirkin, 2013/04/20
- Re: [Qemu-devel] [PULL v4 07/11] rdma: introduce capability for chunk registration, Paolo Bonzini, 2013/04/21
- Re: [Qemu-devel] [PULL v4 07/11] rdma: introduce capability for chunk registration, Michael S. Tsirkin, 2013/04/21
- Re: [Qemu-devel] [PULL v4 07/11] rdma: introduce capability for chunk registration, Michael R. Hines, 2013/04/21