Skip to content

Commit 6789af0

Browse files
Stefan-Rasplbonzini
authored andcommitted
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>
1 parent df72ecf commit 6789af0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/kvm/kvm_stat/kvm_stat‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ class Tui(object):
12061206
row += 1
12071207
if row == 3:
12081208
self.screen.addstr(4, 1, 'No matching events reported yet')
1209-
else:
1209+
if row > 4:
12101210
tavg = int(round(tcur / sleeptime)) if tcur > 0 else ''
12111211
self.screen.addstr(row, 1, '%-40s %10d %8s' %
12121212
('Total', total, tavg), curses.A_BOLD)

0 commit comments

Comments
 (0)