Microservice: Benchmarking¶
The following section describes how to build, import and run a set of containerized benchmarks. These instructions assume an existing ECI installation, familiarity with building Docker containers.
Building: Benchmarking Container¶
The following section is applicable to:

The following steps detail how to build a Yocto poky based Docker image which contains benchmarks.
If not already completed, follow the section Setting up ECI Build to prepare the build system.
Navigate to the directory where the ECI build script
setup.sh
is located. The build is started as follows:$ mkdir -p ./build/container-benchmarking $ cd ./build/container-benchmarking $ kas build ../../targets/kas/container-benchmarking.yml
After the build has completed successfully, there will be a tarballed OCI-compatible image under
build/tmp/deploy/images/qemux86-64/container-benchmarking-qemux86-64.tar.bz2
:Docker Image archive name
Description of Docker Image
container-benchmarking-qemux86-64.tar.bz2
Docker image which contains benchmarks.
Executing: Benchmarking Container¶
The following section is applicable to:

Ensure that the Docker daemon is active. Run the following command to restart the Docker daemon.
Warning
All running Docker containers will also restart.
$ systemctl restart docker
The status of the Docker daemon can be verified with the following command:
$ systemctl status docker
Copy the Docker image created earlier to the target system.
Import the copied Docker image by performing the following command:
$ docker import container-benchmarking-qemux86-64.tar.bz2
When the command complete, a
SHA1
value will be outputted like this (the value will be different):sha256:1f16709f60bb127e97478b78c0a31fc6ec99c7a5525379ae52c46acb827e0097
The image that was imported which can be identified with the
SHA1
should be present in the list of Docker images provided by the command:$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE <none> <none> 1f16709f60bb 8 minutes ago 154MB
The image can be instantiated with a new container by using the image ID to run the benchmarks with this command:
$ docker run -it --rm \ --name benchmarking \ --privileged \ --pid=host \ 1f16709f60bb \ /bin/sh