Fix Rally metadata

We need to strip all whitespace from actions. Also need to match action
in the _type: error.

Change-Id: I931ff583652a84040e286c08e3cf8db381d91125
This commit is contained in:
Joe Talerico 2016-09-26 10:47:01 -04:00 committed by Sai Sindhur Malleni
parent 56bcf10964
commit ce5d34ffd4

View File

@ -142,8 +142,14 @@ class Rally(WorkloadBase.WorkloadBase):
rally_data[value] = []
rally_data[value].append(metrics[workload][value])
if len(metrics['error']) > 0:
error = {'action_name': value,
iteration = 1
workload_name = value
if value.find('(') is not -1:
iteration = re.findall('\d+', value)
workload_name = value.split('(')[0]
error = {'action': workload_name.strip(),
'browbeat_rerun': run,
'iteration': iteration,
'error_type': metrics['error'][0],
'error_msg': metrics['error'][1],
'result': task_id,
@ -161,7 +167,7 @@ class Rally(WorkloadBase.WorkloadBase):
iteration = re.findall('\d+', workload)
workload_name = workload.split('(')[0]
rally_stats = {'result': task_id,
'action': workload_name,
'action': workload_name.strip(),
'browbeat_rerun': run,
'iteration': iteration,
'timestamp': str(es_ts).replace(" ", "T"),