forked from kubernetes/perf-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run
executable file
·42 lines (37 loc) · 1.48 KB
/
run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/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.
# $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.
# $4 - Optional NodeLocalDNS IP to test against. If not provided, it uses 169.254.20.10.
outDir=${2:-"out"}
nodeLocalIP=${4:-"169.254.20.10"}
mkdir -p ${outDir}
pip install numpy
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 --params params/coredns/default.yaml --out-dir ${outDir} --use-cluster-dns
;;
node-local-dns )
python py/run_perf.py --params params/nodelocaldns/default.yaml --out-dir ${outDir} --nodecache-ip ${nodeLocalIP}
;;
esac
if [ "$#" -ge 3 ]; then
mkdir -p $3
go run ./jsonify/main.go --benchmarkDirPath=${outDir}/latest --jsonDirPath=$3 --benchmarkName="dns"
fi