diff --git a/tests/metrics/cmd/checkmetrics/ci_worker/checkmetrics-json-clh-kata-metric8.toml b/tests/metrics/cmd/checkmetrics/ci_worker/checkmetrics-json-clh-kata-metric8.toml index ca1c4355ea..632493344e 100644 --- a/tests/metrics/cmd/checkmetrics/ci_worker/checkmetrics-json-clh-kata-metric8.toml +++ b/tests/metrics/cmd/checkmetrics/ci_worker/checkmetrics-json-clh-kata-metric8.toml @@ -45,3 +45,29 @@ checktype = "mean" midval = 4135244.0 minpercent = 20.0 maxpercent = 20.0 + +[[metric]] +name = "blogbench" +type = "json" +description = "measure container average of blogbench write" +# Min and Max values to set a 'range' that +# the median of the CSV Results data must fall +# within (inclusive) +checkvar = ".\"blogbench\".Results | .[] | .write.Result" +checktype = "mean" +midval = 1623.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 = 96939.0 +minpercent = 20.0 +maxpercent = 20.0 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 e599ee2657..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 @@ -45,3 +45,29 @@ checktype = "mean" midval = 3677280.0 minpercent = 25.0 maxpercent = 25.0 + +[[metric]] +name = "blogbench" +type = "json" +description = "measure container average of blogbench write" +# Min and Max values to set a 'range' that +# the median of the CSV Results data must fall +# within (inclusive) +checkvar = ".\"blogbench\".Results | .[] | .write.Result" +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/gha-run.sh b/tests/metrics/gha-run.sh index 1ea5cd19cf..cfba540f0f 100755 --- a/tests/metrics/gha-run.sh +++ b/tests/metrics/gha-run.sh @@ -72,17 +72,15 @@ function run_test_memory_usage_inside_container() { create_symbolic_links ${KATA_HYPERVISOR} bash tests/metrics/density/memory_usage_inside_container.sh 5 - - check_metrics } function run_test_blogbench() { info "Running Blogbench test using ${KATA_HYPERVISOR} hypervisor" - # ToDo: remove the exit once the metrics workflow is stable - exit 0 create_symbolic_links ${KATA_HYPERVISOR} bash tests/metrics/storage/blogbench.sh + + check_metrics } function main() { diff --git a/tests/metrics/storage/blogbench.sh b/tests/metrics/storage/blogbench.sh index 19a960103d..21e3a546d9 100755 --- a/tests/metrics/storage/blogbench.sh +++ b/tests/metrics/storage/blogbench.sh @@ -36,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}) @@ -83,11 +84,11 @@ EOF local json="$(cat << EOF { "write": { - "Result" : "${writes}", + "Result" : ${writes}, "Units" : "items" }, "read": { - "Result" : "${reads}", + "Result" : ${reads}, "Units" : "items" }, "Nb blogs": { diff --git a/tests/metrics/storage/blogbench_dockerfile/Dockerfile b/tests/metrics/storage/blogbench_dockerfile/Dockerfile index 593063798b..08d06cec56 100644 --- a/tests/metrics/storage/blogbench_dockerfile/Dockerfile +++ b/tests/metrics/storage/blogbench_dockerfile/Dockerfile @@ -11,6 +11,8 @@ FROM docker.io/library/ubuntu:latest # Version of the Dockerfile LABEL DOCKERFILE_VERSION="1.0" +ENV DEBIAN_FRONTEND=noninteractive + # URL for blogbench test and blogbench version ENV BLOGBENCH_URL "https://download.pureftpd.org/pub/blogbench" ENV BLOGBENCH_VERSION 1.1