From 65d9f3f85790b17ae5577110f89ee53b9e2a1016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miles=20St=C3=B6tzner?= Date: Tue, 3 Dec 2024 21:50:50 +0100 Subject: [PATCH] meassure resolving times --- .../scripts/times.sh | 35 +++++++++++++++++++ .../scripts/configuration.env | 6 ++-- .../scripts/times.sh | 35 +++++++++++++++++++ .../scripts/times.sh | 35 +++++++++++++++++++ 4 files changed, 108 insertions(+), 3 deletions(-) create mode 100755 examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/times.sh create mode 100755 examples/unfurl-technology---industry---plus-maintenance-automated/scripts/times.sh create mode 100755 examples/unfurl-technology---shop---plus-maintenance-automated/scripts/times.sh diff --git a/examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/times.sh b/examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/times.sh new file mode 100755 index 0000000000..26f0b569cb --- /dev/null +++ b/examples/unfurl-technology---boutique---plus-maintenance-automated/scripts/times.sh @@ -0,0 +1,35 @@ +#! /usr/bin/bash +set -e + +# Set working directory +cd "$(dirname "$0")" + +# Load configuration +source configuration.sh + +# Ensure vintner binary is used +VINTNER=/usr/bin/vintner +if [[ ! -f "${VINTNER}" ]]; then + echo "vintner binary located at \"${VINTNER}\" must be used" + exit 0 +fi + +# Prepare +rm -rf /tmp/boutique-model +cp -R ${TEMPLATE_DIR} /tmp/boutique-model + +# Enrich +echo "Enriching ..." +time $VINTNER template enrich --template /tmp/boutique-model/variable-service-template.yaml --output /tmp/boutique-model/variable-service-template.yaml +echo +echo + +# Resolve +for DIR in ../tests/*/; +do + DIR=$(basename $DIR) + echo "Resolving \"${DIR}\" ..." + time $VINTNER template resolve --template /tmp/boutique-model/variable-service-template.yaml --output /tmp/boutique-model/variable-service-template-${DIR}.yaml --inputs ${TEMPLATE_DIR}/tests/${DIR}/inputs.yaml + echo + echo +done \ No newline at end of file diff --git a/examples/unfurl-technology---industry---plus-maintenance-automated/scripts/configuration.env b/examples/unfurl-technology---industry---plus-maintenance-automated/scripts/configuration.env index 047812aaf3..2ffa465e06 100644 --- a/examples/unfurl-technology---industry---plus-maintenance-automated/scripts/configuration.env +++ b/examples/unfurl-technology---industry---plus-maintenance-automated/scripts/configuration.env @@ -1,5 +1,5 @@ TEMPLATE_NAME="technology-gcp" -#VINTNER="node ../../../build/cli/index.js" -VINTNER="../../../task vintner" +VINTNER="node ../../../build/cli/index.js" +#VINTNER="../../../task vintner" ORCHESTRATOR="unfurl" -VARIANT="local" +VARIANT="hyperscaler" diff --git a/examples/unfurl-technology---industry---plus-maintenance-automated/scripts/times.sh b/examples/unfurl-technology---industry---plus-maintenance-automated/scripts/times.sh new file mode 100755 index 0000000000..26f0b569cb --- /dev/null +++ b/examples/unfurl-technology---industry---plus-maintenance-automated/scripts/times.sh @@ -0,0 +1,35 @@ +#! /usr/bin/bash +set -e + +# Set working directory +cd "$(dirname "$0")" + +# Load configuration +source configuration.sh + +# Ensure vintner binary is used +VINTNER=/usr/bin/vintner +if [[ ! -f "${VINTNER}" ]]; then + echo "vintner binary located at \"${VINTNER}\" must be used" + exit 0 +fi + +# Prepare +rm -rf /tmp/boutique-model +cp -R ${TEMPLATE_DIR} /tmp/boutique-model + +# Enrich +echo "Enriching ..." +time $VINTNER template enrich --template /tmp/boutique-model/variable-service-template.yaml --output /tmp/boutique-model/variable-service-template.yaml +echo +echo + +# Resolve +for DIR in ../tests/*/; +do + DIR=$(basename $DIR) + echo "Resolving \"${DIR}\" ..." + time $VINTNER template resolve --template /tmp/boutique-model/variable-service-template.yaml --output /tmp/boutique-model/variable-service-template-${DIR}.yaml --inputs ${TEMPLATE_DIR}/tests/${DIR}/inputs.yaml + echo + echo +done \ No newline at end of file diff --git a/examples/unfurl-technology---shop---plus-maintenance-automated/scripts/times.sh b/examples/unfurl-technology---shop---plus-maintenance-automated/scripts/times.sh new file mode 100755 index 0000000000..26f0b569cb --- /dev/null +++ b/examples/unfurl-technology---shop---plus-maintenance-automated/scripts/times.sh @@ -0,0 +1,35 @@ +#! /usr/bin/bash +set -e + +# Set working directory +cd "$(dirname "$0")" + +# Load configuration +source configuration.sh + +# Ensure vintner binary is used +VINTNER=/usr/bin/vintner +if [[ ! -f "${VINTNER}" ]]; then + echo "vintner binary located at \"${VINTNER}\" must be used" + exit 0 +fi + +# Prepare +rm -rf /tmp/boutique-model +cp -R ${TEMPLATE_DIR} /tmp/boutique-model + +# Enrich +echo "Enriching ..." +time $VINTNER template enrich --template /tmp/boutique-model/variable-service-template.yaml --output /tmp/boutique-model/variable-service-template.yaml +echo +echo + +# Resolve +for DIR in ../tests/*/; +do + DIR=$(basename $DIR) + echo "Resolving \"${DIR}\" ..." + time $VINTNER template resolve --template /tmp/boutique-model/variable-service-template.yaml --output /tmp/boutique-model/variable-service-template-${DIR}.yaml --inputs ${TEMPLATE_DIR}/tests/${DIR}/inputs.yaml + echo + echo +done \ No newline at end of file