Skip to content

Commit

Permalink
updating run script
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysied committed Nov 30, 2018
1 parent 1ad248d commit 21df277
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 13 deletions.
34 changes: 33 additions & 1 deletion dns/run
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
#!/bin/sh
# Copyright 2018 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

python py/run_perf.py "$@"
# $1 - Test type.
# $2 - Optional test output directory path. If not provided default "out" is used.
# $3 - Optional json metrics directory path. If not provided metrics will not be created.

outDir=${2:-"out"}
mkdir -p ${outDir}

case "$1" in
kube-dns )
python py/run_perf.py --params params/kubedns/default.yaml --out-dir ${outDir} --use-cluster-dns
;;
core-dns )
python py/run_perf.py --dns-server coredns --params params/coredns/default.yaml --out-dir out --use-cluster-dns
;;
esac

if [ "$#" -eq 3 ]; then
mkdir -p $3
go run ./jsonify/main.go --benchmarkDirPath=${outDir}/latest --jsonDirPath=$3 --benchmarkName=$1
fi
15 changes: 3 additions & 12 deletions run-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,9 @@ case "$1" in
cd ${PERFTEST_ROOT}/network/benchmarks/netperf/ && go run ./launch.go --kubeConfig="${HOME}/.kube/config" --hostnetworking --iterations 1
exit
;;
kube-dns )
#KUBE-DNS
cd ${PERFTEST_ROOT}/dns
mkdir out
./run --params params/kubedns/default.yaml --out-dir out --use-cluster-dns
exit
;;
core-dns )
#CORE-DNS
cd ${PERFTEST_ROOT}/dns
mkdir out
./run --dns-server coredns --params params/coredns/default.yaml --out-dir out --use-cluster-dns
kube-dns|core-dns )
cd dns
./run $@
exit
;;
--help | -h )
Expand Down

0 comments on commit 21df277

Please sign in to comment.