mbox series

[0/6] Create more common interfaces in misc and use them

Message ID 20220726133535.10824-1-jkacur@redhat.com
Headers show
Series Create more common interfaces in misc and use them | expand

Message

John Kacur July 26, 2022, 1:35 p.m. UTC
The purpose of these patches is to reduce the number of interfaces that
do the same thing and standardize on the functions in systopology. This
has already been to some degree with past patches, but is not complete.

In particular I added the method online_cpus() to class SysTopology
and the function collapse_cpulist() to the file systopology.py

Then I visited each file that imported from misc and made use of the new
interfaces. This leaves only the function cpuinfo() in misc. I have not
yet removed the duplicate functions in misc, but that will be done in a
subsequent set of patches.

While making use of the interfaces in systopology from various other
files, I took the opportunity to clean-up the files, namely I used
f-strings instead of regular strings for readability, added some
docstrings to functions and methods, and made use of the more
pythonesque "in" instead of chained "ifs"


John Kacur (6):
  rteval: Create common  functions in CpuList and SysTopology
  rteval: Make use of systopology instead of misc in rteval-cmd
  rteval: Make use of systopology instead of misc in hackbench
  rteval: Make use of systopology instead of misc in kcompile
  rteval: Make use of systopology instead of misc in stressng module
  rteval: Make use of systopology instead of misc in cyclictest

 rteval-cmd                               | 45 ++++++------
 rteval/modules/loads/hackbench.py        | 30 ++++----
 rteval/modules/loads/kcompile.py         | 86 +++++++++++-----------
 rteval/modules/loads/stressng.py         | 15 ++--
 rteval/modules/measurement/cyclictest.py | 67 ++++++++++--------
 rteval/systopology.py                    | 90 +++++++++++++++++++-----
 6 files changed, 201 insertions(+), 132 deletions(-)