aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/compute/lmbench_latency_benchmark.bash
diff options
context:
space:
mode:
authorAlexandru Nemes <alexandru.nemes@enea.com>2017-06-02 13:26:30 +0300
committerAlexandru Nemes <alexandru.nemes@enea.com>2017-06-22 08:05:03 +0000
commitd3b6455e19f9bc291601ee6400d99552d1962711 (patch)
tree1b773f2c4a712da2398f20f1f0fd0f279e7c46d2 /yardstick/benchmark/scenarios/compute/lmbench_latency_benchmark.bash
parent5bdc049447e44738f8a0d67228906c07fd94821e (diff)
Adapt lmbench scripts for aarch64 nodes
LMBench shell scripts were invoking x86_64 executables. This made them fail when executed on aarch64 nodes. Added architecture detection and proper command call. JIRA: ARMBAND-268 Change-Id: I8c9e87158631f7f5479adc2fda9558f9f7e54406 Signed-off-by: Alexandru Nemes <alexandru.nemes@enea.com> (cherry picked from commit fd2b3173d21d34720f714e7e6358dafe7d1ada12)
Diffstat (limited to 'yardstick/benchmark/scenarios/compute/lmbench_latency_benchmark.bash')
-rw-r--r--yardstick/benchmark/scenarios/compute/lmbench_latency_benchmark.bash9
1 files changed, 8 insertions, 1 deletions
diff --git a/yardstick/benchmark/scenarios/compute/lmbench_latency_benchmark.bash b/yardstick/benchmark/scenarios/compute/lmbench_latency_benchmark.bash
index 04e3c1a9d..be27a87b0 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,10 @@ 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
+ REL_PATH="lat_mem_rd"
+else
+ REL_PATH="x86_64-linux-gnu/lat_mem_rd"
+fi
+/usr/lib/lmbench/bin/${REL_PATH} $SIZE $STRIDE 2>&1 | output_json \ No newline at end of file