]> git.baikalelectronics.ru Git - kernel.git/commit
tools/kvm_stat: fix event counts display for interrupted intervals
authorStefan Raspl <raspl@linux.vnet.ibm.com>
Wed, 7 Jun 2017 19:08:26 +0000 (21:08 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 8 Jun 2017 16:13:23 +0000 (18:13 +0200)
commit019af1f012c398251b5eae21548257732a491297
treee2551445b4cd606a2446835a0d37300eec96f212
parentbfe660760aad35565b1713d9da1bf1d4c0daa5d3
tools/kvm_stat: fix event counts display for interrupted intervals

When an update interval is interrupted via key press (e.g. space), the
'Current' column value is calculated using the full interval length
instead of the elapsed time, which leads to lower than actual numbers.
Furthermore, the value should be rounded, not truncated.
This is fixed by using the actual elapsed time for the calculation.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/kvm/kvm_stat/kvm_stat