aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xyardstick/cmd/commands/task.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/yardstick/cmd/commands/task.py b/yardstick/cmd/commands/task.py
index 8db6e77e6..0d7e9e66d 100755
--- a/yardstick/cmd/commands/task.py
+++ b/yardstick/cmd/commands/task.py
@@ -14,7 +14,8 @@ import os
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
@@ -22,6 +23,7 @@ from yardstick.common.utils import cliargs
output_file_default = "/tmp/yardstick.out"
test_cases_dir_default = "tests/opnfv/test_cases/"
+LOG = logging.getLogger(__name__)
class TaskCommands(object):
@@ -51,6 +53,7 @@ class TaskCommands(object):
atexit.register(atexit_handler)
+ total_start_time = time.time()
parser = TaskParser(args.inputfile[0])
suite_params = {}
@@ -75,6 +78,7 @@ class TaskCommands(object):
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])
@@ -89,6 +93,13 @@ class TaskCommands(object):
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)
print "Done, exiting"