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