Merge "Fix rally task detailed --iterations-data"
This commit is contained in:
commit
98d02dd8c5
@ -283,16 +283,11 @@ class TaskCommands(object):
|
|||||||
for col in float_cols]))
|
for col in float_cols]))
|
||||||
for (c, r) in enumerate(raw_data, 1):
|
for (c, r) in enumerate(raw_data, 1):
|
||||||
dlist = [c]
|
dlist = [c]
|
||||||
|
dlist.append(r["duration"])
|
||||||
if r["atomic_actions"]:
|
if r["atomic_actions"]:
|
||||||
dlist.append(r["duration"])
|
|
||||||
for action in atomic_actions:
|
for action in atomic_actions:
|
||||||
dlist.append(r["atomic_actions"].get(action) or 0)
|
dlist.append(r["atomic_actions"].get(action) or 0)
|
||||||
table_rows.append(rutils.Struct(**dict(zip(headers,
|
table_rows.append(rutils.Struct(**dict(zip(headers, dlist))))
|
||||||
dlist))))
|
|
||||||
else:
|
|
||||||
data = dlist + [None for i in range(1, len(headers))]
|
|
||||||
table_rows.append(rutils.Struct(**dict(zip(headers,
|
|
||||||
data))))
|
|
||||||
common_cliutils.print_list(table_rows,
|
common_cliutils.print_list(table_rows,
|
||||||
fields=headers,
|
fields=headers,
|
||||||
formatters=formatters)
|
formatters=formatters)
|
||||||
|
@ -64,6 +64,27 @@ class TaskTestCase(unittest.TestCase):
|
|||||||
self.assertIn("dummy_fail_test (2)", detailed)
|
self.assertIn("dummy_fail_test (2)", detailed)
|
||||||
detailed_iterations_data = rally("task detailed --iterations-data")
|
detailed_iterations_data = rally("task detailed --iterations-data")
|
||||||
self.assertIn("2. dummy_fail_test (2)", detailed_iterations_data)
|
self.assertIn("2. dummy_fail_test (2)", detailed_iterations_data)
|
||||||
|
self.assertNotIn("n/a", detailed_iterations_data)
|
||||||
|
|
||||||
|
def test_detailed_no_atomic_actions(self):
|
||||||
|
rally = utils.Rally()
|
||||||
|
cfg = {
|
||||||
|
"Dummy.dummy": [
|
||||||
|
{
|
||||||
|
"runner": {
|
||||||
|
"type": "constant",
|
||||||
|
"times": 100,
|
||||||
|
"concurrency": 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
config = utils.TaskConfig(cfg)
|
||||||
|
rally("task start --task %s" % config.filename)
|
||||||
|
detailed = rally("task detailed")
|
||||||
|
self.assertIn("Dummy.dummy", detailed)
|
||||||
|
detailed_iterations_data = rally("task detailed --iterations-data")
|
||||||
|
self.assertNotIn("n/a", detailed_iterations_data)
|
||||||
|
|
||||||
def test_results(self):
|
def test_results(self):
|
||||||
rally = utils.Rally()
|
rally = utils.Rally()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user