Code Review
/
yardstick.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Adding cpu set to enable affinity for given vcpu
[yardstick.git]
/
yardstick
/
benchmark
/
runners
/
iteration.py
diff --git
a/yardstick/benchmark/runners/iteration.py
b/yardstick/benchmark/runners/iteration.py
index
88158ee
..
cb04243
100644
(file)
--- a/
yardstick/benchmark/runners/iteration.py
+++ b/
yardstick/benchmark/runners/iteration.py
@@
-20,11
+20,13
@@
"""
from __future__ import absolute_import
"""
from __future__ import absolute_import
-import os
-import multiprocessing
+
import logging
import logging
-import
traceback
+import
multiprocessing
import time
import time
+import traceback
+
+import os
from yardstick.benchmark.runners import base
from yardstick.benchmark.runners import base
@@
-88,9
+90,9
@@
def _worker_process(queue, cls, method_name, scenario_cfg,
scenario_cfg['options']['rate'] -= delta
sequence = 1
continue
scenario_cfg['options']['rate'] -= delta
sequence = 1
continue
- except Exception
as e
:
+ except Exception:
errors = traceback.format_exc()
errors = traceback.format_exc()
- LOG.exception(
e
)
+ LOG.exception(
""
)
else:
if result:
# add timeout for put so we don't block test
else:
if result:
# add timeout for put so we don't block test
@@
-151,7
+153,9
@@
If the scenario ends before the time has elapsed, it will be started again.
__execution_type__ = 'Iteration'
def _run_benchmark(self, cls, method, scenario_cfg, context_cfg):
__execution_type__ = 'Iteration'
def _run_benchmark(self, cls, method, scenario_cfg, context_cfg):
+ name = "{}-{}-{}".format(self.__execution_type__, scenario_cfg.get("type"), os.getpid())
self.process = multiprocessing.Process(
self.process = multiprocessing.Process(
+ name=name,
target=_worker_process,
args=(self.result_queue, cls, method, scenario_cfg,
context_cfg, self.aborted, self.output_queue))
target=_worker_process,
args=(self.result_queue, cls, method, scenario_cfg,
context_cfg, self.aborted, self.output_queue))