]> 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)
commita79c747fa61f73541ed7d04d2c9c3d1095df8acf
treee2551445b4cd606a2446835a0d37300eec96f212
parente145dbf07cae7798ef80afaac7feb3409028e88e
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