diff --git a/tests/metrics/cmd/checkmetrics/ci_worker/checkmetrics-json-qemu-kata-metric8.toml b/tests/metrics/cmd/checkmetrics/ci_worker/checkmetrics-json-qemu-kata-metric8.toml index 5ce5802a66..c84aa1d2b9 100644 --- a/tests/metrics/cmd/checkmetrics/ci_worker/checkmetrics-json-qemu-kata-metric8.toml +++ b/tests/metrics/cmd/checkmetrics/ci_worker/checkmetrics-json-qemu-kata-metric8.toml @@ -58,3 +58,16 @@ checktype = "mean" midval = 1639.0 minpercent = 20.0 maxpercent = 20.0 + +[[metric]] +name = "blogbench" +type = "json" +description = "measure container average of blogbench read" +# Min and Max values to set a 'range' that +# the median of the CSV Results data must fall +# within (inclusive) +checkvar = ".\"blogbench\".Results | .[] | .read.Result" +checktype = "mean" +midval = 98687.0 +minpercent = 20.0 +maxpercent = 20.0 diff --git a/tests/metrics/storage/blogbench.sh b/tests/metrics/storage/blogbench.sh index 4146ecba3e..21e3a546d9 100755 --- a/tests/metrics/storage/blogbench.sh +++ b/tests/metrics/storage/blogbench.sh @@ -11,7 +11,6 @@ # they are total scores for all iterations (this is the blogbench default output) set -e -set -x # General env SCRIPT_PATH=$(dirname "$(readlink -f "$0")") @@ -27,7 +26,7 @@ ITERATIONS="${ITERATIONS:-30}" # Directory to run the test on # This is run inside of the container -TESTDIR="${TESTDIR:-/home}" +TESTDIR="${TESTDIR:-/tmp}" CMD="blogbench -i ${ITERATIONS} -d ${TESTDIR}" function main() { @@ -37,6 +36,7 @@ function main() { init_env check_cmds "${cmds[@]}" check_ctr_images "${IMAGE}" "${DOCKERFILE}" + sudo systemctl restart containerd metrics_json_init local output=$(sudo -E ${CTR_EXE} run --rm --runtime=${CTR_RUNTIME} ${IMAGE} test ${CMD}) @@ -84,11 +84,11 @@ EOF local json="$(cat << EOF { "write": { - "Result" : "${writes}", + "Result" : ${writes}, "Units" : "items" }, "read": { - "Result" : "${reads}", + "Result" : ${reads}, "Units" : "items" }, "Nb blogs": {