mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-09-06 18:05:37 +00:00
kvm_stat: add column headers to text UI
The curses user interface shows both the accumulated total and the current event counts. Add column headers so it's clear what the numbers mean. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Ademar Reis <areis@redhat.com> Reviewed-by: Wei Huang <wei@redhat.com> Message-Id: <1425338947-10296-2-git-send-email-stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
532cee4184
commit
9a7dcb711b
|
@ -519,7 +519,10 @@ def tui(screen, stats):
|
||||||
def refresh(sleeptime):
|
def refresh(sleeptime):
|
||||||
screen.erase()
|
screen.erase()
|
||||||
screen.addstr(0, 0, 'kvm statistics')
|
screen.addstr(0, 0, 'kvm statistics')
|
||||||
row = 2
|
screen.addstr(2, 1, 'Event')
|
||||||
|
screen.addstr(2, 1 + label_width + number_width - len('Total'), 'Total')
|
||||||
|
screen.addstr(2, 1 + label_width + number_width + 8 - len('Current'), 'Current')
|
||||||
|
row = 3
|
||||||
s = stats.get()
|
s = stats.get()
|
||||||
def sortkey(x):
|
def sortkey(x):
|
||||||
if s[x][1]:
|
if s[x][1]:
|
||||||
|
|
Loading…
Reference in a new issue