Skip to content

Commit

Permalink
Fix Rally metadata
Browse files Browse the repository at this point in the history
We need to strip all whitespace from actions. Also need to match action
in the _type: error.

Change-Id: I931ff583652a84040e286c08e3cf8db381d91125
  • Loading branch information
jtaleric authored and smalleni committed Sep 27, 2016
1 parent 56bcf10 commit ce5d34f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/Rally.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,14 @@ def json_result(self, task_id, scenario_name, run, test_name):
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,
Expand All @@ -161,7 +167,7 @@ def json_result(self, task_id, scenario_name, run, test_name):
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"),
Expand Down

0 comments on commit ce5d34f

Please sign in to comment.