Skip to content

Commit

Permalink
meassure resolving times
Browse files Browse the repository at this point in the history
  • Loading branch information
milesstoetzner committed Dec 3, 2024
1 parent 87f3242 commit 65d9f3f
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 65d9f3f

Please sign in to comment.