mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 12:14:48 +00:00
metrics: Improve naming testing containers in launch times test
This commit provides a new way to name the containers used in the launch-times-test in this form: 'kata_launch_times_RANDOM_NUMBER', where RANDOM_NUMBER is in the 0-1000 range. Fixes: #7529 Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
This commit is contained in:
parent
5dbe88330f
commit
1e15369e59
@ -96,6 +96,7 @@ run_workload() {
|
||||
# number of decimal digits after the decimal points
|
||||
# for 'bc' performing math in kernel period estimation
|
||||
L_CALC_SCALE=13
|
||||
local CONTAINER_NAME="kata_launch_times_$(( $RANDOM % 1000 + 1))"
|
||||
start_time=$($DATECMD)
|
||||
|
||||
# Check entropy level of the host
|
||||
@ -103,8 +104,7 @@ run_workload() {
|
||||
|
||||
# Run the image and command and capture the results into an array...
|
||||
declare workload_result
|
||||
readarray -n 0 workload_result < <(sudo -E "${CTR_EXE}" run --rm --runtime=${CTR_RUNTIME} ${IMAGE} test bash -c "$DATECMD $DMESGCMD")
|
||||
|
||||
readarray -n 0 workload_result < <(sudo -E "${CTR_EXE}" run --rm --runtime ${CTR_RUNTIME} ${IMAGE} ${CONTAINER_NAME} bash -c "$DATECMD $DMESGCMD")
|
||||
end_time=$($DATECMD)
|
||||
|
||||
# Delay this calculation until after we have run - do not want
|
||||
|
Loading…
Reference in New Issue
Block a user