aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark')
-rwxr-xr-xyardstick/benchmark/runners/base.py7
-rwxr-xr-xyardstick/benchmark/scenarios/availability/ha_tools/check_process_python.bash2
-rw-r--r--yardstick/benchmark/scenarios/compute/cachestat.py2
3 files changed, 8 insertions, 3 deletions
diff --git a/yardstick/benchmark/runners/base.py b/yardstick/benchmark/runners/base.py
index 7c76e42df..b48ed973a 100755
--- a/yardstick/benchmark/runners/base.py
+++ b/yardstick/benchmark/runners/base.py
@@ -22,6 +22,7 @@ import logging
import multiprocessing
import subprocess
import time
+import os
import traceback
from oslo_config import cfg
@@ -40,7 +41,11 @@ def _output_serializer_main(filename, queue, config):
Use of this process enables multiple instances of a scenario without
messing up the output file.
"""
- out_type = config['yardstick'].get('DEFAULT', {}).get('dispatcher', 'file')
+ try:
+ out_type = config['yardstick'].get('DEFAULT', {})['dispatcher']
+ except KeyError:
+ out_type = os.environ.get('DISPATCHER', 'file')
+
conf = {
'type': out_type.capitalize(),
'file_path': filename
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/check_process_python.bash b/yardstick/benchmark/scenarios/availability/ha_tools/check_process_python.bash
index 88baed7d9..7c275f7ce 100755
--- a/yardstick/benchmark/scenarios/availability/ha_tools/check_process_python.bash
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/check_process_python.bash
@@ -15,4 +15,4 @@ set -e
process_name=$1
-ps aux | grep -e .*python.*$process_name.* | grep -v grep | wc -l
+ps aux | grep -e $process_name | grep -v grep | wc -l
diff --git a/yardstick/benchmark/scenarios/compute/cachestat.py b/yardstick/benchmark/scenarios/compute/cachestat.py
index b4c3463e5..8873b9683 100644
--- a/yardstick/benchmark/scenarios/compute/cachestat.py
+++ b/yardstick/benchmark/scenarios/compute/cachestat.py
@@ -103,7 +103,7 @@ class CACHEstat(base.Scenario):
def _filtrate_result(self, result):
fields = []
cachestat = {}
- data_marker = re.compile("\d+")
+ data_marker = re.compile(r"\d+")
ite = 0
average = {'HITS': 0, 'MISSES': 0, 'DIRTIES': 0, 'RATIO': 0,
'BUFFERS_MB': 0, 'CACHE_MB': 0}