]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
tools/kvm_stat: use a namedtuple for storing the values
authorMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
Tue, 9 Jan 2018 12:27:02 +0000 (13:27 +0100)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 12 Apr 2018 13:26:54 +0000 (10:26 -0300)
commit0cc030f63d49f63cbb107d30b00f2012cdd29098
tree7f0738192af08917e877e347b5f6e297378dbf8a
parent8f5b64d2040eb416a4270af91f2855d1c491359c
tools/kvm_stat: use a namedtuple for storing the values

BugLink: http://bugs.launchpad.net/bugs/1734130
Use a namedtuple for storing the values as it allows to access the
fields of a tuple via names. This makes the overall code much easier
to read and to understand. Access by index is still possible as
before.

Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Tested-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 006f1548ac13d67d21865416a0f4e8062df1a85f)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
tools/kvm/kvm_stat/kvm_stat