---
# Copyright (c) 2018-2023 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
---
\pagebreak

# Introduction
This report compares the metrics between multiple sets of data generated from
the [Kata Containers report generation scripts](https://github.com/kata-containers/kata-containers/tree/main/metrics/report/README.md).

This report was generated using the data from the **`r resultdirs`** results directories.

\pagebreak

# Container scaling system footprint
This [test](https://github.com/kata-containers/kata-containers/blob/main/metrics/density/footprint_data.sh)
measures the system memory footprint impact whilst running an increasing number
of containers. For this test, [KSM](https://en.wikipedia.org/wiki/Kernel_same-page_merging)
 is enabled. The results show how system memory is consumed for different sized
containers, and their average system memory footprint cost and density (how many
containers you can fit per Gb) is calculated.

```{r footprint-density, echo=FALSE, fig.cap="System Memory density"}
test_name_extra="-ksm"
source('footprint-density.R')
rm(test_name_extra)
```
\pagebreak

# Memory used inside container
This [test](https://github.com/kata-containers/kata-containers/blob/main/metrics/density/memory_usage_inside_container.sh)
measures the memory inside a container taken by the container runtime. It shows the difference between the amount of memory requested for the container, and the amount the container can actually 'see'.

The *% Consumed* is the key row in the table, which compares the *Requested* against *Total* values.


```{r mem-in-cont, echo=FALSE, fig.cap="System Memory density"}
source('mem-in-cont.R')
```
\pagebreak

# Container boot lifecycle times
This [test](https://github.com/kata-containers/kata-containers/blob/main/metrics/time/launch_times.sh)
uses the `date` command on the host and in the container, as well as data from the container
kernel `dmesg`, to ascertain how long different phases of the create/boot/run/delete
Docker container lifecycle take for the first launched container.

To decode the stats table, the prefixes are 'to(`2`)' and '`i`n'. The suffixes are '`k`ernel', '`w`orkload' and '`q`uit'. 'tot' is the total time for a complete container start-to-finished cycle.

```{r lifecycle-time, echo=FALSE, fig.cap="Execution lifecycle times"}
source('lifecycle-time.R')
```
\pagebreak

# Test setup details

This table describes the test system details, as derived from the information contained
in the test results files.


```{r dut, echo=FALSE, fig.cap="System configuration details"}
source('dut-details.R')
