From: Ondrej Lichtner <olichtne(a)redhat.com>
Sort the hosts where we start the CPUStatMonitor jobs, this is because
the provided `self._conf` object is a set() and this means that
sometimes the jobs get created in different orders.
This is ok wrt. validity of the jobs, however it makes it more difficult
for humans to compare result logs when the measurement results are
different each execution.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/RecipeCommon/Perf/Measurements/StatCPUMeasurement.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst/RecipeCommon/Perf/Measurements/StatCPUMeasurement.py
b/lnst/RecipeCommon/Perf/Measurements/StatCPUMeasurement.py
index 5dbf404..028cd67 100644
--- a/lnst/RecipeCommon/Perf/Measurements/StatCPUMeasurement.py
+++ b/lnst/RecipeCommon/Perf/Measurements/StatCPUMeasurement.py
@@ -38,7 +38,7 @@ def version(self):
def start(self):
jobs = []
- for host in self._conf:
+ for host in sorted(self._conf, key=lambda x: x.hostid):
jobs.append(
host.run(
CPUStatMonitor(interval=1000),
--
2.29.2