mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-27 19:35:32 +00:00
metrics: storing metrics workflow artifacts
This PR enables storing metrics workflow artifacts in two separated flavours: clh and qemu. Fixes: #7239 Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
This commit is contained in:
parent
a3fc673121
commit
1ca17c2f70
11
.github/workflows/run-metrics.yaml
vendored
11
.github/workflows/run-metrics.yaml
vendored
@ -42,3 +42,14 @@ jobs:
|
||||
|
||||
- name: run blogbench test
|
||||
run: bash tests/metrics/gha-run.sh run-test-blogbench
|
||||
|
||||
- name: make metrics tarball ${{ matrix.vmm }}
|
||||
run: bash tests/metrics/gha-run.sh make-tarball-results
|
||||
|
||||
- name: archive metrics results ${{ matrix.vmm }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: metrics-artifacts-${{ matrix.vmm }}
|
||||
path: results-${{ matrix.vmm }}.tar.gz
|
||||
retention-days: 1
|
||||
if-no-files-found: error
|
||||
|
@ -240,3 +240,17 @@ restart_containerd_service() {
|
||||
clean_env_ctr
|
||||
return 0
|
||||
}
|
||||
|
||||
# @path_results: path to the input metric-results folder
|
||||
# @tarball_fname: path and filename to the output tarball
|
||||
function compress_metrics_results_dir()
|
||||
{
|
||||
local path_results="${1:-results}"
|
||||
local tarball_fname="${2:-}"
|
||||
|
||||
[ -z "${tarball_fname}" ] && die "Missing the tarball filename or the path to save the tarball results is incorrect."
|
||||
[ ! -d "${path_results}" ] && die "Missing path to the results folder."
|
||||
|
||||
cd "${path_results}" && tar -czf "${tarball_fname}" *.json && cd -
|
||||
info "tarball generated: ${tarball_fname}"
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ set -o pipefail
|
||||
kata_tarball_dir="${2:-kata-artifacts}"
|
||||
metrics_dir="$(dirname "$(readlink -f "$0")")"
|
||||
source "${metrics_dir}/../common.bash"
|
||||
source "${metrics_dir}/lib/common.bash"
|
||||
|
||||
declare -r results_dir="${metrics_dir}/results"
|
||||
declare -r checkmetrics_dir="${metrics_dir}/cmd/checkmetrics"
|
||||
@ -104,6 +105,10 @@ function check_metrics() {
|
||||
fi
|
||||
}
|
||||
|
||||
function make_tarball_results() {
|
||||
compress_metrics_results_dir "${metrics_dir}/results" "${GITHUB_WORKSPACE}/results-${KATA_HYPERVISOR}.tar.gz"
|
||||
}
|
||||
|
||||
function run_test_launchtimes() {
|
||||
info "Running Launch Time test using ${KATA_HYPERVISOR} hypervisor"
|
||||
|
||||
@ -144,6 +149,7 @@ function main() {
|
||||
action="${1:-}"
|
||||
case "${action}" in
|
||||
install-kata) install_kata ;;
|
||||
make-tarball-results) make_tarball_results ;;
|
||||
run-test-launchtimes) run_test_launchtimes ;;
|
||||
run-test-memory-usage) run_test_memory_usage ;;
|
||||
run-test-memory-usage-inside-container) run_test_memory_usage_inside_container ;;
|
||||
|
Loading…
Reference in New Issue
Block a user