mirror of
https://github.com/containers/podman.git
synced 2025-10-16 02:32:55 +08:00
Cirrus: Make benchmarks .env file easier to load
The `benchmarks.env` file is intended for machine consumption. Including things like a `kB` unit label (like `$MEMTOTAL`) make items difficult to parse. Additionally, multi-value keys (like `$UNAME_RM`) make extra/unnecessary work for the interpreter. Simplify these items and include a data-schema version marker so an interpreter can be made aware/support future format changes. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
@ -346,10 +346,12 @@ localbenchmarks() {
|
||||
# Checked above in req_env_vars
|
||||
# shellcheck disable=SC2154
|
||||
echo "\
|
||||
BENCH_ENV_VER=1
|
||||
CPUTOTAL=$(grep -ce '^processor' /proc/cpuinfo)
|
||||
INST_TYPE=$EC2_INST_TYPE # one day may include other cloud's VM types.
|
||||
MEMTOTAL=$(awk -F: '$1 == "MemTotal" { print $2 }' </proc/meminfo | sed -e "s/^ *//")
|
||||
UNAME_RM=$(uname -r -m)
|
||||
INST_TYPE=$EC2_INST_TYPE
|
||||
MEMTOTALKB=$(awk -F: '$1 == "MemTotal" { print $2 }' </proc/meminfo | sed -e "s/^ *//" | cut -d ' ' -f 1)
|
||||
UNAME_R=$(uname -r)
|
||||
UNAME_M=$(uname -m)
|
||||
"
|
||||
) > $datadir/benchmarks.env
|
||||
make localbenchmarks | tee $datadir/benchmarks.raw
|
||||
|
Reference in New Issue
Block a user