kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kvm_stat: ignore events that have never occured
@ 2010-09-01  7:17 Avi Kivity
  2010-09-06  8:39 ` Jes Sorensen
  0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2010-09-01  7:17 UTC (permalink / raw)
  To: Marcelo Tosatti, kvm

Less cluttered display.

Signed-off-by: Avi Kivity <avi@redhat.com>
---
 kvm/kvm_stat |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kvm/kvm_stat b/kvm/kvm_stat
index 4a16277..d373c60 100755
--- a/kvm/kvm_stat
+++ b/kvm/kvm_stat
@@ -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
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kvm_stat: ignore events that have never occured
  2010-09-01  7:17 [PATCH] kvm_stat: ignore events that have never occured Avi Kivity
@ 2010-09-06  8:39 ` Jes Sorensen
  2010-09-06  8:55   ` Avi Kivity
  0 siblings, 1 reply; 3+ messages in thread
From: Jes Sorensen @ 2010-09-06  8:39 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Marcelo Tosatti, kvm

On 09/01/10 09:17, Avi Kivity wrote:
> Less cluttered display.
> 
> Signed-off-by: Avi Kivity <avi@redhat.com>
> ---
>  kvm/kvm_stat |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/kvm/kvm_stat b/kvm/kvm_stat
> index 4a16277..d373c60 100755
> --- a/kvm/kvm_stat
> +++ b/kvm/kvm_stat
> @@ -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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kvm_stat: ignore events that have never occured
  2010-09-06  8:39 ` Jes Sorensen
@ 2010-09-06  8:55   ` Avi Kivity
  0 siblings, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2010-09-06  8:55 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: Marcelo Tosatti, kvm

  On 09/06/2010 11:39 AM, Jes Sorensen wrote:
> On 09/01/10 09:17, Avi Kivity wrote:
>> Less cluttered display.
>>
>> Signed-off-by: Avi Kivity<avi@redhat.com>
>> ---
>>   kvm/kvm_stat |    2 ++
>>   1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/kvm/kvm_stat b/kvm/kvm_stat
>> index 4a16277..d373c60 100755
>> --- a/kvm/kvm_stat
>> +++ b/kvm/kvm_stat
>> @@ -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.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-06  8:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-01  7:17 [PATCH] kvm_stat: ignore events that have never occured Avi Kivity
2010-09-06  8:39 ` Jes Sorensen
2010-09-06  8:55   ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).