Merge "Fix trends in case of failures in contexts"

This commit is contained in:
Zuul 2017-11-25 14:30:03 +00:00 committed by Gerrit Code Review
commit 8b63ceb10d
1 changed files with 6 additions and 1 deletions

View File

@ -309,7 +309,12 @@ class Trends(object):
self._data[key]["sla_failures"] += not workload["pass_sla"]
duration_stats = workload["statistics"]["durations"]
ts = int(workload["start_time"] * 1000)
if not workload["start_time"]:
# NOTE(andreykurilin): The workload didn't start. Probably,
# one of contexts failed.
ts = None
else:
ts = int(workload["start_time"] * 1000)
for action in itertools.chain(duration_stats["atomics"],
[duration_stats["total"]]):