total time and one task time both will be put into console
JIRA:YARDSTICK-166
Change-Id: I1422355c5ca0228c11e6334c13bb13554bdca4af
Signed-off-by: kubi <jean.gaoliang@huawei.com>
import yaml
import atexit
import ipaddress
import yaml
import atexit
import ipaddress
+import time
+import logging
from yardstick.benchmark.contexts.base import Context
from yardstick.benchmark.runners import base as base_runner
from yardstick.common.task_template import TaskTemplate
from yardstick.benchmark.contexts.base import Context
from yardstick.benchmark.runners import base as base_runner
from yardstick.common.task_template import TaskTemplate
output_file_default = "/tmp/yardstick.out"
test_cases_dir_default = "tests/opnfv/test_cases/"
output_file_default = "/tmp/yardstick.out"
test_cases_dir_default = "tests/opnfv/test_cases/"
+LOG = logging.getLogger(__name__)
class TaskCommands(object):
class TaskCommands(object):
atexit.register(atexit_handler)
atexit.register(atexit_handler)
+ total_start_time = time.time()
parser = TaskParser(args.inputfile[0])
suite_params = {}
parser = TaskParser(args.inputfile[0])
suite_params = {}
os.remove(args.output_file)
for i in range(0, len(task_files)):
os.remove(args.output_file)
for i in range(0, len(task_files)):
+ one_task_start_time = time.time()
parser.path = task_files[i]
scenarios, run_in_parallel = parser.parse_task(task_args[i],
task_args_fnames[i])
parser.path = task_files[i]
scenarios, run_in_parallel = parser.parse_task(task_args[i],
task_args_fnames[i])
for context in Context.list:
context.undeploy()
Context.list = []
for context in Context.list:
context.undeploy()
Context.list = []
+ one_task_end_time = time.time()
+ LOG.info("task %s finished in %d secs", task_files[i],
+ one_task_end_time - one_task_start_time)
+
+ total_end_time = time.time()
+ LOG.info("total finished in %d secs",
+ total_end_time - total_start_time)