Skip to contentSkip to conversation

kvm_stat: ignore events that have never occured

PATCH In review Avi Kivity 2 participants 3 messages Sep 1, 2010 – Sep 6, 2010 KVM

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

PATCH 1/1 kvm_stat: ignore events that have never occured

Less cluttered display.

---
 kvm/kvm_stat |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
kvm/kvm_stat +2 -0
index 4a16277..d373c60 100755
@@ -315,6 +315,8 @@ def tui(screen, stats):
             if row >= screen.getmaxyx()[0]:
                 break
             values = s[key]
+            if not values[0] and not values[1]:
+                break
             col = 1
             screen.addstr(row, col, key)
             col += label_width
Signature · 1 line
1.7.1
#1 lore raw
Quoted 12 lines · Avi Kivity

Less cluttered display.

---
 kvm/kvm_stat |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
kvm/kvm_stat +0 -0
index 4a16277..d373c60 100755

kvm/kvm_stat def tui(screen, stats): · line 322

Quoted 8 lines
kvm/kvm_stat +2 -0
@@ -315,6 +315,8 @@ def tui(screen, stats):
             if row >= screen.getmaxyx()[0]:
                 break
             values = s[key]
+            if not values[0] and not values[1]:
+                break
             col = 1
             screen.addstr(row, col, key)
             col += label_width

Is this just for the live display update, or does it also affect single run outputs?

If the latter, it will break scripting where you do a first run, then a second run and then calculate the result based on the changes.

Cheers,
Jes

author
#2 lore raw
Quoted 8 lines · Jes Sorensen
Quoted 7 lines · Avi Kivity

Less cluttered display.

---
  kvm/kvm_stat |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
Quoted 16 lines

kvm/kvm_stat def tui(screen, stats): · line 322

Quoted 13 lines
kvm/kvm_stat +2 -0
index 4a16277..d373c60 100755
@@ -315,6 +315,8 @@ def tui(screen, stats):
              if row>= screen.getmaxyx()[0]:
                  break
              values = s[key]
+            if not values[0] and not values[1]:
+                break
              col = 1
              screen.addstr(row, col, key)
              col += label_width

Is this just for the live display update, or does it also affect single run outputs?

Just the live update.

Signature · 1 line
error compiling committee.c: too many arguments to function