checkmetrics: Add blogbench read value for qemu

This PR adds the blogbench read value for qemu.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
This commit is contained in:
Gabriela Cervantes 2023-07-11 17:38:23 +00:00
parent 2935aeb7d7
commit 9e048c8ee0
2 changed files with 17 additions and 4 deletions

View File

@ -58,3 +58,16 @@ checktype = "mean"
midval = 1639.0 midval = 1639.0
minpercent = 20.0 minpercent = 20.0
maxpercent = 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

View File

@ -11,7 +11,6 @@
# they are total scores for all iterations (this is the blogbench default output) # they are total scores for all iterations (this is the blogbench default output)
set -e set -e
set -x
# General env # General env
SCRIPT_PATH=$(dirname "$(readlink -f "$0")") SCRIPT_PATH=$(dirname "$(readlink -f "$0")")
@ -27,7 +26,7 @@ ITERATIONS="${ITERATIONS:-30}"
# Directory to run the test on # Directory to run the test on
# This is run inside of the container # This is run inside of the container
TESTDIR="${TESTDIR:-/home}" TESTDIR="${TESTDIR:-/tmp}"
CMD="blogbench -i ${ITERATIONS} -d ${TESTDIR}" CMD="blogbench -i ${ITERATIONS} -d ${TESTDIR}"
function main() { function main() {
@ -37,6 +36,7 @@ function main() {
init_env init_env
check_cmds "${cmds[@]}" check_cmds "${cmds[@]}"
check_ctr_images "${IMAGE}" "${DOCKERFILE}" check_ctr_images "${IMAGE}" "${DOCKERFILE}"
sudo systemctl restart containerd
metrics_json_init metrics_json_init
local output=$(sudo -E ${CTR_EXE} run --rm --runtime=${CTR_RUNTIME} ${IMAGE} test ${CMD}) local output=$(sudo -E ${CTR_EXE} run --rm --runtime=${CTR_RUNTIME} ${IMAGE} test ${CMD})
@ -84,11 +84,11 @@ EOF
local json="$(cat << EOF local json="$(cat << EOF
{ {
"write": { "write": {
"Result" : "${writes}", "Result" : ${writes},
"Units" : "items" "Units" : "items"
}, },
"read": { "read": {
"Result" : "${reads}", "Result" : ${reads},
"Units" : "items" "Units" : "items"
}, },
"Nb blogs": { "Nb blogs": {