Fix column name for output of rally task detailed --iterations-data

The `rally task detailed --iterations-data` command prints an output
like this:

+---------------------------+
|   Atomics per iteration   |
+-----------+---------------+
| iteration | full duration |
+-----------+---------------+
| 1         | 0.598         |
| 2         | 0.838         |
| 3         | 0.906         |
| 4         | 0.763         |
| 5         | 0.929         |
| 6         | 0.632         |
| 7         | 0.636         |
| 8         | 0.926         |
| 9         | 0.702         |
| 10        | 0.756         |
+-----------+---------------+

However, the term 'full duration' is not applicable to a single iteration.
It should be applicable to all iterations. So the output should be as follows:

+---------------------------+
|   Atomics per iteration   |
+-----------+---------------+
| iteration | duration      |
+-----------+---------------+
| 1         | 0.598         |
| 2         | 0.838         |
| 3         | 0.906         |
| 4         | 0.763         |
| 5         | 0.929         |
| 6         | 0.632         |
| 7         | 0.636         |
| 8         | 0.926         |
| 9         | 0.702         |
| 10        | 0.756         |
+-----------+---------------+

Change-Id: I5714b486b10a21758d47993413c566a561f78197
This commit is contained in:
Yaroslav Lobankov 2016-09-22 13:28:47 +03:00
parent f1a9abd5c9
commit 0b4b4b48e7

View File

@ -350,7 +350,7 @@ class TaskCommands(object):
print()
iterations = []
iterations_headers = ["iteration", "full duration"]
iterations_headers = ["iteration", "duration"]
iterations_actions = []
output = []
task_errors = []
@ -363,8 +363,7 @@ class TaskCommands(object):
for idx, itr in enumerate(result["iterations"], 1):
if iterations_data:
row = {"iteration": idx,
"full duration": itr["duration"]}
row = {"iteration": idx, "duration": itr["duration"]}
for name, action in iterations_actions:
row[action] = itr["atomic_actions"].get(name, 0)
iterations.append(row)