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)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 24 Feb 2018 00:43:39 +0000 (01:43 +0100)
commit501825f9d011f0046c4f0f40e459090234af54f4
tree1cd9141b5d751773064f6457556cf0997340792f
parentc9b092c39ef6fbb73e811458d141cba4fbdf8f81
tools/kvm_stat: use a namedtuple for storing the values

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>
tools/kvm/kvm_stat/kvm_stat