]>
Commit | Line | Data |
---|---|---|
ae7072eb PL |
1 | #!/bin/sh |
2 | ||
3 | export PDNSRECURSOR=${PDNSRECURSOR:-/usr/sbin/pdns_recursor} | |
4 | export DNSBULKTEST=${DNSBULKTEST:-/usr/bin/dnsbulktest} | |
5 | ||
6 | if [ "$0" != "./build-scripts/test-recursor-bulk" ]; then | |
7 | echo "Please run me from the root checkout dir" | |
8 | exit 1 | |
9 | fi | |
10 | ||
ae7072eb PL |
11 | set -x |
12 | ||
13 | cd regression-tests | |
14 | ||
8a27076c | 15 | wget -c -N http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip |
ae7072eb | 16 | |
f947fe60 | 17 | unzip top-1m.csv.zip |
ae7072eb PL |
18 | |
19 | numdomains="1000 5000 10000 50000 100000 500000 100000" | |
20 | if [ ! -z "$1" ]; then | |
21 | numdomains="$1" | |
22 | fi | |
23 | ||
f230992c | 24 | set +x |
ae7072eb PL |
25 | for prefix in 'www' 'wildcard'; do |
26 | for num in $(seq 0 1000000); do | |
c3bad7e8 | 27 | echo "${num},${prefix}.powerdnssec.org" >> ${prefix}.csv |
ae7072eb PL |
28 | done |
29 | done | |
f230992c | 30 | set -x |
ae7072eb | 31 | |
f947fe60 PL |
32 | EXIT=0 |
33 | ||
ae7072eb PL |
34 | version=$($PDNSRECURSOR --version 2>&1 | awk '/PowerDNS Recursor/ { print $6 }') |
35 | for IPv6 in 0 1; do | |
f947fe60 | 36 | for CSV in $(ls *.csv); do |
ae7072eb | 37 | for domains in $numdomains; do |
65f690ae | 38 | export context="${version}_v6:${IPv6}_csv:${CSV%%.*}" |
ae7072eb PL |
39 | export IPv6 |
40 | export CSV | |
f947fe60 PL |
41 | RECURSOR=$PDNSRECURSOR THRESHOLD=0 TRACE=no time ./recursor-test 5401 $domains || EXIT=1 |
42 | mv -f recursor.log recursor-${context}.log | |
ae7072eb PL |
43 | sleep 10 |
44 | done | |
45 | done | |
46 | done | |
47 | ./bulktest-to-json.py | tee bulktest-results.json | |
48 | ||
49 | # cleanup | |
50 | rm -rf csv/ | |
f947fe60 PL |
51 | rm -f *.log |
52 | rm -f bulktest-results.json | |
53 | ||
54 | exit $EXIT |