提交 6cde6fbe 编写于 作者: J Juan Quintela

migration: Calculate mbps only during transfer time

We used to include in this calculation the setup time, but that can be
quite big in rdma or multifd.
Signed-off-by: NJuan Quintela <quintela@redhat.com>
Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
上级 2a26c979
......@@ -2708,6 +2708,7 @@ static void migration_calculate_complete(MigrationState *s)
{
uint64_t bytes = qemu_ftell(s->to_dst_file);
int64_t end_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
int64_t transfer_time;
s->total_time = end_time - s->start_time;
if (!s->downtime) {
......@@ -2718,8 +2719,9 @@ static void migration_calculate_complete(MigrationState *s)
s->downtime = end_time - s->downtime_start;
}
if (s->total_time) {
s->mbps = ((double) bytes * 8.0) / s->total_time / 1000;
transfer_time = s->total_time - s->setup_time;
if (transfer_time) {
s->mbps = ((double) bytes * 8.0) / transfer_time / 1000;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册