Commit Graph

7 Commits

Author SHA1 Message Date
Aurélien Bombo
25e0e2fb35 ci: fix run-nydus tests
GH-9973 introduced:

 * New function get_kata_memory_and_vcpus() in
   tests/metrics/lib/common.bash.
 * A call to get_kata_memory_and_vcpus() from extract_kata_env(), which
   is defined in tests/common.bash.

Because the nydus test only sources tests/common.bash, it can't find
get_kata_memory_and_vcpus() and errors out.

We fix this by moving the get_kata_memory_and_vcpus() call from
tests/common.bash to tests/metrics/lib/json.bash so that it doesn't
impact the nydus test.

Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
2024-07-10 17:19:08 +00:00
David Esparza
04df85a44f
metrics: Add num_vcpus and free_mem to metrics results template.
This PR retrieves the free memory and the vcpus count from
a kata container and includes them to the json results file of
any metric.

Additionally this PR parses the requested vcpus quantity and the
requested amount memory from kata configuration file and includes
this pair of values into the json results file of any metric.

Finally, the file system defined in the kata configuration file
is included in the results template.

Fixes: #9972

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2024-07-09 10:29:29 -06:00
David Esparza
8c498ef5ee
metrics: Use jq tool to pretty-print json metrics output
This PR enables the use of jq pretty-print feature to
improve the formatting of metric results json files.

Fixes: #8081

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-10-03 23:33:19 -06:00
Gabriela Cervantes
4a5ab38f16 metrics: General improvements to json.bash script
This PR adds general improvements like putting function before function
name and consistency in how we declare variables and so on to have
uniformity across the metrics scripts.

Fixes #7429

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-07-24 16:51:38 +00:00
David Esparza
59f4731bb2
metrics: Stop running kata-env before kata is properly installed.
This PR makes kata-env is called only after some metrics have
completed his workload. This fixes a bug that occurs when
kata-env was being called before kata is already installed on the
testing platform.

Fixes: #7348

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-07-14 13:40:48 -06:00
David Esparza
6924d14df5 metrics: Fix metrics ts generator to treat numbers as decimals
Use bc tool to perform math operations even when variables contain
values with leading zero.

Fixes: #7317

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2023-07-12 20:57:33 +00:00
Gabriela Cervantes
3cefa43e75 tests: Add json script for metrics tests
This PR adds the json script which allow us to save the metrics results
into a json file which will be used in the kata containers metrics.

Fixes #7128

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-06-16 19:45:26 +00:00