code review

This commit is contained in:
Donny Xia
2020-07-13 12:05:03 -07:00
parent 42e19d610a
commit 6fabfe963e
4 changed files with 18 additions and 5 deletions

View File

@@ -56,6 +56,17 @@ function run_tshirt_benchmark {
run_fn $loop "T-shirt Example Container Function" "example_tshirt/containerfn" run_fn $loop "T-shirt Example Container Function" "example_tshirt/containerfn"
} }
if [ "$1" != "--doIt" ]; then
echo "Usage: $0 --doIt"
echo " "
echo "This script measures performance of kustomize containerized"
echo "functions (KRM config functions) implementation."
echo "It does so by running functions in local executable mode and"
echo "in container mode for 10, 100 and 1000 times. The time"
echo "used in these 2 modes are recorded."
exit 1
fi
loops=(10 100 1000) loops=(10 100 1000)
build_exec build_exec

View File

@@ -5,4 +5,5 @@ BUILD_HOME=/usr/local/build
docker build -t $IMAGE_LABEL . docker build -t $IMAGE_LABEL .
docker run --rm -v $(pwd):/out $IMAGE_LABEL cp -r $BUILD_HOME/functions/examples/injection-tshirt-sizes/image/tshirt /out docker run --rm -v $(pwd):/out $IMAGE_LABEL \
cp -r $BUILD_HOME/functions/examples/injection-tshirt-sizes/image/tshirt /out

View File

@@ -5,4 +5,5 @@ BUILD_HOME=/usr/local/build
docker build -t $IMAGE_LABEL . docker build -t $IMAGE_LABEL .
docker run --rm -v $(pwd):/out $IMAGE_LABEL cp -r $BUILD_HOME/ts/hello-world/dist $BUILD_HOME/ts/hello-world/node_modules /out docker run --rm -v $(pwd):/out $IMAGE_LABEL \
cp -r $BUILD_HOME/ts/hello-world/dist $BUILD_HOME/ts/hello-world/node_modules /out

View File

@@ -1,9 +1,9 @@
# Benchmark for KRM functions in Kustomize # Benchmark for KRM functions in Kustomize
## Pre-request ## Pre-prerequisites
- You have to use Kustomize version with KRM function supported. - [kustomize v3.7.0 or higher](https://kubernetes-sigs.github.io/kustomize/installation) (support for KRM Config Functions).
- You need to have Docker running on your machine. - [docker](https://github.com/kubernetes-sigs/kustomize/pull/docker.com)
## How to run ## How to run