summaryrefslogtreecommitdiffstats
path: root/tools/kvm
diff options
context:
space:
mode:
authorStefan Raspl <stefan.raspl@de.ibm.com>2018-02-22 06:16:30 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2018-02-23 19:43:46 -0500
commit6789af030a462708f937137e05eb12ea009fb348 (patch)
tree06df2d3a37ba977243030c7787702c54c2e74503 /tools/kvm
parentdf72ecfc790fa01de1c41f836ff51d12f9c40318 (diff)
tools/kvm_stat: print 'Total' line for multiple events only
The 'Total' line looks a bit weird when we have a single event only. This can happen e.g. due to filters. Therefore suppress when there's only a single event in the output. Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/kvm')
-rwxr-xr-xtools/kvm/kvm_stat/kvm_stat2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/kvm/kvm_stat/kvm_stat b/tools/kvm/kvm_stat/kvm_stat
index 862c997932e2..5898c22ba310 100755
--- a/tools/kvm/kvm_stat/kvm_stat
+++ b/tools/kvm/kvm_stat/kvm_stat
@@ -1206,7 +1206,7 @@ class Tui(object):
1206 row += 1 1206 row += 1
1207 if row == 3: 1207 if row == 3:
1208 self.screen.addstr(4, 1, 'No matching events reported yet') 1208 self.screen.addstr(4, 1, 'No matching events reported yet')
1209 else: 1209 if row > 4:
1210 tavg = int(round(tcur / sleeptime)) if tcur > 0 else '' 1210 tavg = int(round(tcur / sleeptime)) if tcur > 0 else ''
1211 self.screen.addstr(row, 1, '%-40s %10d %8s' % 1211 self.screen.addstr(row, 1, '%-40s %10d %8s' %
1212 ('Total', total, tavg), curses.A_BOLD) 1212 ('Total', total, tavg), curses.A_BOLD)