mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-09 11:58:16 +00:00
commit
c40b3b4ce7
@ -176,11 +176,6 @@ function extract_kata_env() {
|
|||||||
RUNTIME_PATH="$(echo "${kata_env}" | jq -r ${runtime_path})"
|
RUNTIME_PATH="$(echo "${kata_env}" | jq -r ${runtime_path})"
|
||||||
SHARED_FS="$(echo "${kata_env}" | jq -r ${shared_fs})"
|
SHARED_FS="$(echo "${kata_env}" | jq -r ${shared_fs})"
|
||||||
|
|
||||||
# get_kata_memory_and_vcpus() function measures the memory and the number of vcpus
|
|
||||||
# from a kata container, and saves these values in the variables:
|
|
||||||
# 'MEASURED_CONTAINER_NUM_VCPUS' and 'MEASURED_CONTAINER_TOTAL_MEM'
|
|
||||||
get_kata_memory_and_vcpus
|
|
||||||
|
|
||||||
# get the requested memory and num of vcpus from the kata config file.
|
# get the requested memory and num of vcpus from the kata config file.
|
||||||
config_content="$(cat ${RUNTIME_CONFIG_PATH} | grep -vE "^#")"
|
config_content="$(cat ${RUNTIME_CONFIG_PATH} | grep -vE "^#")"
|
||||||
REQ_MEMORY="$(echo "${config_content}" | grep -i default_memory | cut -d "=" -f2 | awk '{print $1}')"
|
REQ_MEMORY="$(echo "${config_content}" | grep -i default_memory | cut -d "=" -f2 | awk '{print $1}')"
|
||||||
|
@ -43,6 +43,11 @@ function metrics_json_init() {
|
|||||||
despaced_name="$(echo ${TEST_NAME} | sed 's/[ \/]/-/g')"
|
despaced_name="$(echo ${TEST_NAME} | sed 's/[ \/]/-/g')"
|
||||||
json_filename="${RESULT_DIR}/${despaced_name}.json"
|
json_filename="${RESULT_DIR}/${despaced_name}.json"
|
||||||
|
|
||||||
|
# get_kata_memory_and_vcpus() function measures the memory and the number of vcpus
|
||||||
|
# from a kata container, and saves these values in the variables:
|
||||||
|
# 'MEASURED_CONTAINER_NUM_VCPUS' and 'MEASURED_CONTAINER_TOTAL_MEM'
|
||||||
|
get_kata_memory_and_vcpus
|
||||||
|
|
||||||
local json="$(cat << EOF
|
local json="$(cat << EOF
|
||||||
"@timestamp" : $(timestamp_ms)
|
"@timestamp" : $(timestamp_ms)
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user