From: Ondrej Lichtner <olichtne(a)redhat.com>
If stream measurement was unsuccessful (no connection, or bad
configuration), the recipe would crash with an exception because the
dictionary key hierarchy wouldn't be defined - moving this to the
"job.passed" branch fixes the issue.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/RecipeCommon/Perf/Measurements/IperfFlowMeasurement.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst/RecipeCommon/Perf/Measurements/IperfFlowMeasurement.py
b/lnst/RecipeCommon/Perf/Measurements/IperfFlowMeasurement.py
index ed1f537..81aabb7 100644
--- a/lnst/RecipeCommon/Perf/Measurements/IperfFlowMeasurement.py
+++ b/lnst/RecipeCommon/Perf/Measurements/IperfFlowMeasurement.py
@@ -164,7 +164,6 @@ def _prepare_client(self, flow):
job_level=ResultLevel.NORMAL)
def _parse_job_streams(self, job):
- job_start =
job.result["data"]["start"]["timestamp"]["timesecs"]
result = ParallelPerfResult()
if not job.passed:
result.append(PerfInterval(0, 0, "bits", None))
@@ -172,6 +171,7 @@ def _parse_job_streams(self, job):
for i in job.result["data"]["end"]["streams"]:
result.append(SequentialPerfResult())
+ job_start =
job.result["data"]["start"]["timestamp"]["timesecs"]
for interval in job.result["data"]["intervals"]:
interval_start = interval["sum"]["start"]
for i, stream in enumerate(interval["streams"]):
--
2.30.0