Blob Blame History Raw
From d54183dd4ba5e326ebe193815338b9824d5fef56 Mon Sep 17 00:00:00 2001
From: David Hildenbrand <david@redhat.com>
Date: Tue, 17 Oct 2017 19:15:46 +0200
Subject: [PATCH 41/69] tools/kvm_stat: fix undue use of initial sleeptime

RH-Author: David Hildenbrand <david@redhat.com>
Message-id: <20171017191605.2378-21-david@redhat.com>
Patchwork-id: 77331
O-Subject: [RHEL-7.5 qemu-kvm-rhev PATCH 20/39] tools/kvm_stat: fix undue use of initial sleeptime
Bugzilla: 1497137
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: Thomas Huth <thuth@redhat.com>

Upstream-status: linux.git 81468d73b6eb0ed251e7c77f2cc44c0f4edb4d36

commit 81468d73b6eb0ed251e7c77f2cc44c0f4edb4d36
Author: Stefan Raspl <raspl@linux.vnet.ibm.com>
Date:   Wed Jun 7 21:08:27 2017 +0200

    tools/kvm_stat: fix undue use of initial sleeptime

    We should not use the initial sleeptime for any key press that does not
    switch to a different screen, as that introduces an unaesthetic flicker due
    to two updates in quick succession.

    Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 scripts/kvm/kvm_stat | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
index b571584..6e29e5b 100755
--- a/scripts/kvm/kvm_stat
+++ b/scripts/kvm/kvm_stat
@@ -1142,14 +1142,12 @@ class Tui(object):
                 if char == 'x':
                     self.refresh_header()
                     self.update_drilldown()
-                    sleeptime = DELAY_INITIAL
                 if char == 'q':
                     break
                 if char == 'c':
                     self.stats.fields_filter = DEFAULT_REGEX
                     self.refresh_header(0)
                     self.update_pid(0)
-                    sleeptime = DELAY_INITIAL
                 if char == 'f':
                     self.show_filter_selection()
                     sleeptime = DELAY_INITIAL
@@ -1162,7 +1160,6 @@ class Tui(object):
                 if char == 'r':
                     self.refresh_header()
                     self.stats.reset()
-                    sleeptime = DELAY_INITIAL
             except KeyboardInterrupt:
                 break
             except curses.error:
-- 
1.8.3.1