aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/cmd
diff options
context:
space:
mode:
authorrajesh_4k <4k.rajesh@gmail.com>2017-02-27 18:09:00 +0530
committerrajesh_4k <4k.rajesh@gmail.com>2017-03-17 16:21:03 +0530
commit25b21add71fcf7c2c795bd950b5117d69fac68fb (patch)
tree987c921091e0c8a058da91c13bacb731eb01efea /yardstick/cmd
parentcf967b8bf46b5b1ea77b5ca9a8ccee00fbb1e1d6 (diff)
Yardstick: User interface for Yardstick.
Currently Yardstick doesnt have any UI which gives detail analysis of the test-results. This commit generates a HTML page after the execution of a command "yardstick report generate <task-ID> <TC-name>" which intern can be executed after the execution of test-case. Used: Highcharts.js for the graphs. JIRA: YARDSTICK-280 Change-Id: Ic98cc348719f3922bff178f52e7944a4a931763a Signed-off-by: Rajesh K <4k.rajesh@gmail.com>
Diffstat (limited to 'yardstick/cmd')
-rw-r--r--yardstick/cmd/cli.py4
-rw-r--r--yardstick/cmd/commands/report.py33
2 files changed, 36 insertions, 1 deletions
diff --git a/yardstick/cmd/cli.py b/yardstick/cmd/cli.py
index 1f8dfee2d..79f66e574 100644
--- a/yardstick/cmd/cli.py
+++ b/yardstick/cmd/cli.py
@@ -27,6 +27,7 @@ from yardstick.cmd.commands import scenario
from yardstick.cmd.commands import testcase
from yardstick.cmd.commands import plugin
from yardstick.cmd.commands import env
+from yardstick.cmd.commands import report
CONF = cfg.CONF
cli_opts = [
@@ -62,7 +63,8 @@ class YardstickCLI():
'scenario': scenario.ScenarioCommands,
'testcase': testcase.TestcaseCommands,
'plugin': plugin.PluginCommands,
- 'env': env.EnvCommand
+ 'env': env.EnvCommand,
+ 'report': report.ReportCommands
}
def __init__(self):
diff --git a/yardstick/cmd/commands/report.py b/yardstick/cmd/commands/report.py
new file mode 100644
index 000000000..87ae7d5f7
--- /dev/null
+++ b/yardstick/cmd/commands/report.py
@@ -0,0 +1,33 @@
+##############################################################################
+# Copyright (c) 2017 Rajesh Kudaka.
+#
+# Author: Rajesh Kudaka (4k.rajesh@gmail.com)
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+""" Handler for yardstick command 'report' """
+
+from __future__ import print_function
+
+from __future__ import absolute_import
+
+from yardstick.benchmark.core.report import Report
+from yardstick.cmd.commands import change_osloobj_to_paras
+from yardstick.common.utils import cliargs
+
+
+class ReportCommands(object):
+ """Report commands.
+
+ Set of commands to manage benchmark tasks.
+ """
+
+ @cliargs("task_id", type=str, help=" task id", nargs=1)
+ @cliargs("yaml_name", type=str, help=" Yaml file Name", nargs=1)
+ def do_generate(self, args):
+ """Start a benchmark scenario."""
+ param = change_osloobj_to_paras(args)
+ Report().generate(param)