aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-06-08 09:56:02 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-06-08 09:56:02 +0000
commitec5467f1d2ff5fbf994018707de295fd5c02f7f9 (patch)
tree6ab202a57ecdfa545b53255998cade7301f1b5cc
parent0509cf3e141b550653e642083907a584450a7fdf (diff)
parentfd2b3173d21d34720f714e7e6358dafe7d1ada12 (diff)
Merge "Adapt lmbench scripts for aarch64 nodes"
-rw-r--r--yardstick/benchmark/scenarios/compute/lmbench_bandwidth_benchmark.bash8
-rw-r--r--yardstick/benchmark/scenarios/compute/lmbench_latency_benchmark.bash9
-rw-r--r--yardstick/benchmark/scenarios/compute/lmbench_latency_for_cache.bash8
3 files changed, 21 insertions, 4 deletions
diff --git a/yardstick/benchmark/scenarios/compute/lmbench_bandwidth_benchmark.bash b/yardstick/benchmark/scenarios/compute/lmbench_bandwidth_benchmark.bash
index 09993a088..714207b0d 100644
--- a/yardstick/benchmark/scenarios/compute/lmbench_bandwidth_benchmark.bash
+++ b/yardstick/benchmark/scenarios/compute/lmbench_bandwidth_benchmark.bash
@@ -19,6 +19,8 @@ SIZE=$1
TEST_NAME=$2
WARMUP=$3
+NODE_CPU_ARCH="$(uname -m)"
+
# write the result to stdout in json format
output_json()
{
@@ -26,4 +28,8 @@ output_json()
echo $DATA | awk '/ /{printf "{\"size(MB)\": %s, \"bandwidth(MBps)\": %s}", $1, $2}'
}
-/usr/lib/lmbench/bin/x86_64-linux-gnu/bw_mem -W $WARMUP ${SIZE}k $TEST_NAME 2>&1 | output_json \ No newline at end of file
+if [ "${NODE_CPU_ARCH}" == "aarch64" ]; then
+ /usr/lib/lmbench/bin/bw_mem -W $WARMUP ${SIZE}k $TEST_NAME 2>&1 | output_json
+else
+ /usr/lib/lmbench/bin/x86_64-linux-gnu/bw_mem -W $WARMUP ${SIZE}k $TEST_NAME 2>&1 | output_json
+fi
diff --git a/yardstick/benchmark/scenarios/compute/lmbench_latency_benchmark.bash b/yardstick/benchmark/scenarios/compute/lmbench_latency_benchmark.bash
index 04e3c1a9d..b45470666 100644
--- a/yardstick/benchmark/scenarios/compute/lmbench_latency_benchmark.bash
+++ b/yardstick/benchmark/scenarios/compute/lmbench_latency_benchmark.bash
@@ -19,6 +19,8 @@ SIZE=$1
shift
STRIDE=$1
+NODE_CPU_ARCH="$(uname -m)"
+
# write the result to stdout in json format
output_json()
{
@@ -37,5 +39,8 @@ output_json()
echo ]
}
-/usr/lib/lmbench/bin/x86_64-linux-gnu/lat_mem_rd $SIZE $STRIDE 2>&1 | output_json
-
+if [ "${NODE_CPU_ARCH}" == "aarch64" ]; then
+ /usr/lib/lmbench/bin/lat_mem_rd $SIZE $STRIDE 2>&1 | output_json
+else
+ /usr/lib/lmbench/bin/x86_64-linux-gnu/lat_mem_rd $SIZE $STRIDE 2>&1 | output_json
+fi
diff --git a/yardstick/benchmark/scenarios/compute/lmbench_latency_for_cache.bash b/yardstick/benchmark/scenarios/compute/lmbench_latency_for_cache.bash
index 2ed1bbe14..2fdd0aaaa 100644
--- a/yardstick/benchmark/scenarios/compute/lmbench_latency_for_cache.bash
+++ b/yardstick/benchmark/scenarios/compute/lmbench_latency_for_cache.bash
@@ -18,6 +18,8 @@ set -e
REPETITON=$1
WARMUP=$2
+NODE_CPU_ARCH="$(uname -m)"
+
# write the result to stdout in json format
output_json()
{
@@ -25,5 +27,9 @@ output_json()
echo $DATA | awk '{printf "{\"L1cache\": %s}", $5}'
}
-/usr/lib/lmbench/bin/x86_64-linux-gnu/cache -W $WARMUP -N $REPETITON 2>&1 | output_json
+if [ "${NODE_CPU_ARCH}" == "aarch64" ]; then
+ /usr/lib/lmbench/bin/cache -W $WARMUP -N $REPETITON 2>&1 | output_json
+else
+ /usr/lib/lmbench/bin/x86_64-linux-gnu/cache -W $WARMUP -N $REPETITON 2>&1 | output_json
+fi