summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2017-06-01 11:18:23 +0800
committerChase Qi <chase.qi@linaro.org>2017-06-01 12:01:50 +0800
commitdff37392dcc3466ef91c2a7be47754197a351aa8 (patch)
treea8b520dfd7dc31f459bd56ad3a92b759ffa526fd
parent687ede45a260573b92e16ecfb11df276893f1351 (diff)
linux: sysbench: cope with LAVA V2
Split sysbench's result line avg/stddev into two metrics to avoid using slash in test-case-id and measurement. Using slash in test-case-id or measurement is valid in LAVA V1, but invalid in V2. Refer to lava-dispatcher's source code 'lava_dispatcher/pipeline/actions/test/shell.py' line #389 and #420. Change-Id: Ic3c411745c88827ebff78421e9ceebaec8f94cbd Signed-off-by: Chase Qi <chase.qi@linaro.org>
-rwxr-xr-xautomated/linux/sysbench/sysbench.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/automated/linux/sysbench/sysbench.sh b/automated/linux/sysbench/sysbench.sh
index 12441e2..a818ae8 100755
--- a/automated/linux/sysbench/sysbench.sh
+++ b/automated/linux/sysbench/sysbench.sh
@@ -108,10 +108,16 @@ general_parser() {
done
ms=$(grep "events (avg/stddev)" "${logfile}" | awk '{print $NF}')
- add_metric "${tc}-events-avg/stddev" "pass" "${ms}" "times"
+ ms_avg=$(echo "${ms}" | awk -F'/' '{print $1}')
+ ms_stddev=$(echo "${ms}" | awk -F'/' '{print $2}')
+ add_metric "${tc}-events-avg" "pass" "${ms_avg}" "times"
+ add_metric "${tc}-events-stddev" "pass" "${ms_stddev}" "times"
ms=$(grep "execution time (avg/stddev)" "${logfile}" | awk '{print $NF}')
- add_metric "${tc}-execution-time-avg/stddev" "pass" "${ms}" "s"
+ ms_avg=$(echo "${ms}" | awk -F'/' '{print $1}')
+ ms_stddev=$(echo "${ms}" | awk -F'/' '{print $2}')
+ add_metric "${tc}-execution-time-avg" "pass" "${ms_avg}" "s"
+ add_metric "${tc}-execution-time-stddev" "pass" "${ms_stddev}" "s"
}
# Test run.